<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AppLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <div>
        <div class="mb-6">
            
            <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.breadcrumb','data' => ['breadcrumbItems' => $breadcrumbItems,'pageTitle' => $pageTitle]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('breadcrumb'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['breadcrumb-items' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($breadcrumbItems),'page-title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($pageTitle)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
            
        </div>

        
        <div class="card mb-5">
            <header class=" card-header noborder">
                <div class="justify-end flex gap-3 items-center flex-wrap">
                    <h3 class="font-medium text-lg text-black font-Inter dark:text-white text-center mb-5 lg:mb-0 lg:text-left"><?php echo e(__('Backup Monitor')); ?></h3>
                </div>
            </header>
            <div class="card-body px-6 pb-6">
                <div class="overflow-x-auto -mx-6">
                    <div class="inline-block min-w-full align-middle">
                        <div class="overflow-hidden ">
                            <table class="min-w-full divide-y divide-slate-100 table-fixed dark:divide-slate-700">
                                <thead class="bg-slate-200 dark:bg-slate-700">
                                    <tr>
                                        <th scope="col" class="table-th sticky left-0">
                                            #
                                        </th>
                                        <th scope="col" class="table-th ">
                                            <?php echo e(__('DISK')); ?>

                                        </th>
                                        <th scope="col" class="table-th ">
                                            <?php echo e(__('HEALTHY')); ?>

                                        </th>
                                        <th scope="col" class="table-th ">
                                            <?php echo e(__('AMOUNT OF BACKUPS')); ?>

                                        </th>
                                        <th scope="col" class="table-th ">
                                            <?php echo e(__('NEWEST BACKUP')); ?>

                                        </th>
                                        <th scope="col" class="table-th">
                                            <?php echo e(__('USED STORAGE')); ?>

                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-slate-100 dark:bg-slate-800 dark:divide-slate-700">
                                    <?php $__empty_1 = true; $__currentLoopData = $databaseBackupList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr class="border border-slate-100 dark:border-slate-900 relative">
                                        <td class="table-td sticky left-0">
                                            # <?php echo e($loop->iteration); ?>

                                        </td>
                                        <td class="table-td">
                                            <?php echo e($item['disk']); ?>

                                        </td>
                                        <td class="table-td">
                                            <?php if($item['healthy']): ?>
                                            <span class="badge badge-success">
                                                <?php echo e(__('success')); ?>

                                            </span>
                                            <?php else: ?>
                                            <span class="badge badge-danger">
                                                <?php echo e(__('danger')); ?>

                                            </span>
                                            <?php endif; ?>
                                        </td>
                                        <td class="table-td">
                                            <?php echo e($item['amount']); ?>

                                        </td>
                                        <td class="table-td">
                                            <?php echo e($item['newest']); ?>

                                        </td>
                                        <td class="table-td">
                                            <?php echo e($item['usedStorage']); ?>

                                        </td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr class="border border-slate-100 dark:border-slate-900 relative">
                                        <td class="table-cell text-center" colspan="5">
                                            <img src="images/result-not-found.svg" alt="page not found" class="w-64 m-auto" />
                                            <h2 class="text-xl text-slate-700 mb-8 -mt-4"><?php echo e(__('No results found.')); ?></h2>
                                        </td>
                                    </tr>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        

        
        <?php if(session('message')): ?>
        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.alert','data' => ['message' => session('message'),'type' => 'success','class' => 'mt-3']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('alert'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['message' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(session('message')),'type' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('success'),'class' => 'mt-3']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
        <?php endif; ?>
        <?php if(session('error')): ?>
        <?php if (isset($component)) { $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4 = $component; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.alert','data' => ['message' => session('error'),'type' => 'danger']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('alert'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(Illuminate\View\AnonymousComponent::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['message' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(session('error')),'type' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute('danger')]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4)): ?>
<?php $component = $__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4; ?>
<?php unset($__componentOriginalc254754b9d5db91d5165876f9d051922ca0066f4); ?>
<?php endif; ?>
        <?php endif; ?>
        

        
        <div class="card mt-5">
            <header class=" card-header noborder">
                <h3 class="font-medium text-lg text-black font-Inter dark:text-white text-center mb-5 lg:mb-0 lg:text-left"><?php echo e(__('Backup List')); ?></h3>
                <div class="justify-center sm:justify-end flex  gap-3 items-center flex-wrap">
                    
                    <a class="btn inline-flex justify-center btn-dark rounded-[25px] items-center !p-2.5" href="<?php echo e(route('database-backups.index')); ?>">
                        <iconify-icon icon="mdi:refresh" class="text-xl "></iconify-icon>
                    </a>

                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('database_backup create')): ?>
                    
                    <a class="btn inline-flex justify-center btn-dark rounded-[25px] items-center !p-2 !px-3" href="<?php echo e(route('database-backups.create')); ?>">
                        <iconify-icon icon="iconoir:database-backup" class="text-lg mr-1">
                        </iconify-icon>
                        <?php echo e(__('Take Backup')); ?>

                    </a>
                    <?php endif; ?>

                </div>
            </header>
            <div class="card-body px-6 pb-6">
                <div class="overflow-x-auto -mx-6">
                    <div class="inline-block min-w-full align-middle">
                        <div class="overflow-hidden ">
                            <table class="min-w-full divide-y divide-slate-100 table-fixed dark:divide-slate-700">
                                <thead class="bg-slate-200 dark:bg-slate-700">
                                    <tr>
                                        <th scope="col" class="table-th ">
                                            #
                                        </th>
                                        <th scope="col" class="table-th ">
                                            <?php echo e(__('PATH')); ?>

                                        </th>
                                        <th scope="col" class="table-th ">
                                            <?php echo e(__('DATE')); ?>

                                        </th>
                                        <th scope="col" class="table-th w-20">
                                            <?php echo e(__('SIZE')); ?>

                                        </th>
                                        <th scope="col" class="table-th w-20">
                                            <?php echo e(__('ACTION')); ?>

                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-slate-100 dark:bg-slate-800 dark:divide-slate-700">

                                    <?php $__empty_1 = true; $__currentLoopData = $files; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr class="border border-slate-100 dark:border-slate-900 relative">
                                        <td class="table-td sticky left-0">
                                            # <?php echo e($loop->iteration); ?>

                                        </td>
                                        <td class="table-td">
                                            <?php echo e($item['path']); ?>

                                        </td>
                                        <td class="table-td">
                                            <?php echo e(date("F jS, Y", strtotime($item['date']))); ?>

                                        </td>
                                        <td class="table-td whitespace-nowrap">
                                            <?php echo e($item['size']); ?>

                                        </td>
                                        <td class="table-td">
                                            <div class="action-btns space-x-2 flex">
                                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('database_backup download')): ?>
                                                <a class="action-btn" href="<?php echo e(route('database-backups.download', ['fileName'=>$item['file_name']])); ?>">
                                                    <iconify-icon icon="material-symbols:download"></iconify-icon>
                                                </a>
                                                <?php endif; ?>

                                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('database_backup delete')): ?>
                                                <form id="deleteForm<?php echo e($key); ?>" method="POST" action="<?php echo e(route('database-backups.destroy', $key)); ?>" class="cursor-pointer">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('DELETE'); ?>
                                                    <a class="action-btn" onclick="sweetAlertDelete(event, 'deleteForm<?php echo e($key); ?>')" type="submit">
                                                        <iconify-icon icon="fluent:delete-24-regular"></iconify-icon>
                                                    </a>
                                                </form>
                                                <?php endif; ?>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr class="border border-slate-100 dark:border-slate-900 relative">
                                        <td class="table-cell text-center" colspan="5">
                                            <img src="images/result-not-found.svg" alt="page not found" class="w-64 m-auto" />
                                            <h2 class="text-xl text-slate-700 mb-8 -mt-4"><?php echo e(__('No results found.')); ?></h2>
                                        </td>
                                    </tr>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
    </div>

    <?php $__env->startPush('scripts'); ?>
    <script>
        function sweetAlertDelete(event, formId) {
            event.preventDefault();
            let form = document.getElementById(formId);
            Swal.fire({
                title: '<?php echo app('translator')->get('Are you sure ? '); ?>',
                icon : 'question',
                showDenyButton: true,
                confirmButtonText: '<?php echo app('translator')->get('Delete '); ?>',
                denyButtonText: '<?php echo app('translator')->get('Cancel '); ?>',
            }).then((result) => {
                if (result.isConfirmed) {
                    form.submit();
                }
            })
        }
    </script>
    <?php $__env->stopPush(); ?>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?><?php /**PATH D:\laragon\www\dashcode-laravel\resources\views/database-backup/index.blade.php ENDPATH**/ ?>