<?php $__env->startSection('title', 'Aplicações - ZEINER'); ?>
<div class="bg-gray-100">  
  <?php
$__split = function ($name, $params = []) {
    return [$name, $params];
};
[$__name, $__params] = $__split('dashboard.client.header', []);

$key = null;

$key ??= \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::generateKey('lw-1233449497-0', null);

$__html = app('livewire')->mount($__name, $__params, $key);

echo $__html;

unset($__html);
unset($__name);
unset($__params);
unset($__split);
if (isset($__slots)) unset($__slots);
?>
  <?php if (isset($component)) { $__componentOriginal0333221d2829e137521a391cd9bef91c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal0333221d2829e137521a391cd9bef91c = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dashboard.admin-side-bar','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard.admin-side-bar'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal0333221d2829e137521a391cd9bef91c)): ?>
<?php $attributes = $__attributesOriginal0333221d2829e137521a391cd9bef91c; ?>
<?php unset($__attributesOriginal0333221d2829e137521a391cd9bef91c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal0333221d2829e137521a391cd9bef91c)): ?>
<?php $component = $__componentOriginal0333221d2829e137521a391cd9bef91c; ?>
<?php unset($__componentOriginal0333221d2829e137521a391cd9bef91c); ?>
<?php endif; ?>


    <!-- OVERLAY (quando sidebar está aberta no mobile) -->
    <div id="overlay" class="hidden fixed inset-0 bg-black bg-opacity-40 z-40 lg:hidden"></div>

        <!-- CONTEÚDO PRINCIPAL -->
        <main class="lg:ml-64 pt-15 p-6">
         <h1 class="text-3xl font-bold text-gray-700 mb-6">Aplicações</h1>

         <div class="flex items-center gap-2 mb-5">
             <button
                    wire:click='addApplication'
                    class="px-3 py-2 rounded-md bg-blue-600 text-white text-sm font-medium
                    hover:bg-blue-700 transition focus:outline-none  focus:ring-2 focus:ring-blue-400">
                    Adicionar
            </button>              

            <select class=" px-3 py-2 bg-white rounded-md border border-gray-300" name="" id="">
                <option value="">Selecionar</option>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__currentLoopData = $perPageOptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($option ?? 0); ?>"><?php echo e($option ?? 0); ?></option>
                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>              
            </select>

            <div class="flex-1">
                <input type="text" class="px-3 py-1.5 w-full rounded-md focus:outline-none focus:border-blue-400 border border-gray-300  " placeholder="Pesquisar aplicativo"/>
            </div>
                
            
            <div class="flex gap-1 flex-1">
                <input type="date" class="px-3 py-1.5 w-full rounded-md focus:outline-none focus:border-blue-400 border border-gray-300  " placeholder="Pesquisar aplicativo"/>
                <input type="date" class="px-3 py-1.5 w-full rounded-md focus:outline-none focus:border-blue-400 border border-gray-300  " placeholder="Pesquisar aplicativo"/>
            </div>


         </div>

         <!-- INICIO DA TABELA -->
        <div class="bg-white rounded-sm shadow-md overflow-hidden">
            <div class="overflow-x-auto">
                <table class="w-full border-collapse">

                        <?php if (isset($component)) { $__componentOriginal1975795be4a68971dde96d36eb327ca3 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal1975795be4a68971dde96d36eb327ca3 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dashboard.tables.thead','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard.tables.thead'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>

                                        <th class="px-6 py-6  text-sm font-semibold ">Logo</th>                            
                                        <th class="px-6 py-6  text-sm font-semibold ">Aplicativo</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Preço</th>                            
                                        <th class="px-6 py-6  text-sm font-semibold ">Versão</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Tamanho</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Descrição</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Ficheiro</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Download</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Duração</th>
                                        <th class="px-6 py-6  text-sm font-semibold ">Opções</th>

                         <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal1975795be4a68971dde96d36eb327ca3)): ?>
<?php $attributes = $__attributesOriginal1975795be4a68971dde96d36eb327ca3; ?>
<?php unset($__attributesOriginal1975795be4a68971dde96d36eb327ca3); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1975795be4a68971dde96d36eb327ca3)): ?>
<?php $component = $__componentOriginal1975795be4a68971dde96d36eb327ca3; ?>
<?php unset($__componentOriginal1975795be4a68971dde96d36eb327ca3); ?>
<?php endif; ?>

                        <x.dashboard.tables.tbody>

                                    <!-- USER ROW -->
                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $uploaded_apps; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $application): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr class="block md:table-row p-4 md:p-0 hover:bg-gray-100 transition">

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <div class="flex cursor-pointer items-center justify-center">
                                                <img
                                                    src="<?php echo e(asset('storage/img/' . $application['app_logo'])); ?>"
                                                    class="w-14 p-2 h-12 rounded-md object-contain bg-gray-50 border border-gray-100 shadow-sm"
                                                    alt="App logo"
                                                />
                                            </div>

                                        
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700 font-medium">
                                                <?php echo e($application['app_name']); ?>

                                            </p>
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700 font-medium">
                                                <?php echo e($application['app_price']); ?>

                                            </p>
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700">
                                                <?php echo e($application['app_version']); ?>

                                            </p>
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700">
                                                <?php echo e($application['app_size']); ?>

                                            </p>
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700">
                                                <?php echo e($application['app_description']); ?>

                                            </p>
                                            
                                        </td>
                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700">
                                                <?php echo e($application['app_format_type']); ?>

                                            </p>
                                        </td>
                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700">
                                                <a target="_blank" class="text-blue-400 hover:underline " href="<?php echo e(asset('/storage/setups/' .$application['app_address_link_to_download'])); ?>"><?php echo e($application['app_address_link_to_download']); ?></a>
                                            </p>                                
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <p class="text-gray-700"><?php echo e($application['app_duration']); ?></p> 
                                                                        
                                        </td>

                                        <td class="block md:table-cell px-0 md:px-6 py-2 md:py-4">
                                            <div class="flex  gap-2 items-center text-white">
                                                <button
                                                    class="px-3 py-1.5 rounded-md bg-blue-600 text-white text-sm font-medium
                                                        hover:bg-blue-700 transition focus:outline-none focus:ring-2 focus:ring-blue-400">
                                                    Editar
                                                </button>

                                                <button
                                                    class="px-3 py-1.5 rounded-md bg-red-600 text-white text-sm font-medium
                                                        hover:bg-red-700 transition focus:outline-none focus:ring-2 focus:ring-red-400">
                                                    Eliminar
                                                </button>

                                            </div>
                                        </td>

                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr class="hover:bg-gray-50 transition">
                                        <td colspan="100%" class=" px-6 py-4">
                                            <p class="text-gray-700 text-center font-medium w-full">
                                                Nenhum resultado encontrado!
                                            </p>
                                        </td>
                                    </tr>

                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                    
                        </x.dashboard.tables.tbody>

                </table>
            </div>
        </div>

</main>       
        <?php if (isset($component)) { $__componentOriginale952b3d353171969826bf1f75b41d2c9 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale952b3d353171969826bf1f75b41d2c9 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.home.whatsapp-floating-button','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('home.whatsapp-floating-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale952b3d353171969826bf1f75b41d2c9)): ?>
<?php $attributes = $__attributesOriginale952b3d353171969826bf1f75b41d2c9; ?>
<?php unset($__attributesOriginale952b3d353171969826bf1f75b41d2c9); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale952b3d353171969826bf1f75b41d2c9)): ?>
<?php $component = $__componentOriginale952b3d353171969826bf1f75b41d2c9; ?>
<?php unset($__componentOriginale952b3d353171969826bf1f75b41d2c9); ?>
<?php endif; ?>       
    </div>


 <?php $__env->startPush('scripts'); ?>
    <script>
        const sidebar = document.getElementById("sidebar");
        const menuBtn = document.getElementById("menuBtn");
        const overlay = document.getElementById("overlay");
        const closeSidebar = document.getElementById("closeSidebar");


        closeSidebar.onclick = () => {
            sidebar.classList.add("-translate-x-full");
            overlay.classList.add("hidden");
        };

        menuBtn.onclick = () => {
            sidebar.classList.toggle("-translate-x-full");
            overlay.classList.toggle("hidden");
        };

        overlay.onclick = () => {
            sidebar.classList.add("-translate-x-full");
            overlay.classList.add("hidden");
        };

        const userMenuBtn = document.getElementById("userMenuBtn");
        const userMenu = document.getElementById("userMenu");
        const userMenuWrapper = document.getElementById("userMenuWrapper");

        // Abre e fecha ao clicar
        userMenuBtn.onclick = () => {
            userMenu.classList.toggle("hidden");
        };

        // Fecha ao clicar fora
        document.addEventListener("click", function (event) {
            if (!userMenuWrapper.contains(event.target)) {
                userMenu.classList.add("hidden");
            }
        });

    </script>     
 <?php $__env->stopPush(); ?>
<?php /**PATH C:\www\sites\zeiner\zeiner-platform\resources\views/livewire/dashboard/admin/views/application-component.blade.php ENDPATH**/ ?>