<?php $__env->startSection('title', 'Imports'); ?>

<?php $__env->startSection('content'); ?>
    <?php $hasFilters = (bool) array_filter($filters); ?>

    <?php if (isset($component)) { $__componentOriginalf8d4ea307ab1e58d4e472a43c8548d8e = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf8d4ea307ab1e58d4e472a43c8548d8e = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.page-header','data' => ['title' => 'Imports','subtitle' => trans_choice(':count import|:count imports', $batches->total(), ['count' => $batches->total()])]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('page-header'); ?>
<?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(['title' => 'Imports','subtitle' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(trans_choice(':count import|:count imports', $batches->total(), ['count' => $batches->total()]))]); ?>

        <a href="<?php echo e(route('imports.create')); ?>" class="btn btn-primary">
            <i class="bi bi-upload" aria-hidden="true"></i>Import
        </a>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf8d4ea307ab1e58d4e472a43c8548d8e)): ?>
<?php $attributes = $__attributesOriginalf8d4ea307ab1e58d4e472a43c8548d8e; ?>
<?php unset($__attributesOriginalf8d4ea307ab1e58d4e472a43c8548d8e); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf8d4ea307ab1e58d4e472a43c8548d8e)): ?>
<?php $component = $__componentOriginalf8d4ea307ab1e58d4e472a43c8548d8e; ?>
<?php unset($__componentOriginalf8d4ea307ab1e58d4e472a43c8548d8e); ?>
<?php endif; ?>

    <?php if (isset($component)) { $__componentOriginalbc878470a37f1c9fbe6952ea2a04bb2b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalbc878470a37f1c9fbe6952ea2a04bb2b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.table.wrapper','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('table.wrapper'); ?>
<?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 $__env->slot('toolbar', null, []); ?> 
            <?php if (isset($component)) { $__componentOriginale9f22847d79d6273acb27aff60f1f678 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale9f22847d79d6273acb27aff60f1f678 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.filter-bar','data' => ['action' => route('imports.index'),'active' => $hasFilters]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filter-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(['action' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(route('imports.index')),'active' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($hasFilters)]); ?>
                <?php if (isset($component)) { $__componentOriginal3721828986c0d93618ebcde1401641f8 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal3721828986c0d93618ebcde1401641f8 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.filter.select','data' => ['name' => 'module','label' => 'Entity','placeholder' => 'Any entity','selected' => $filters['module'],'options' => $modules]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filter.select'); ?>
<?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(['name' => 'module','label' => 'Entity','placeholder' => 'Any entity','selected' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($filters['module']),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($modules)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal3721828986c0d93618ebcde1401641f8)): ?>
<?php $attributes = $__attributesOriginal3721828986c0d93618ebcde1401641f8; ?>
<?php unset($__attributesOriginal3721828986c0d93618ebcde1401641f8); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal3721828986c0d93618ebcde1401641f8)): ?>
<?php $component = $__componentOriginal3721828986c0d93618ebcde1401641f8; ?>
<?php unset($__componentOriginal3721828986c0d93618ebcde1401641f8); ?>
<?php endif; ?>

                <?php if (isset($component)) { $__componentOriginal3721828986c0d93618ebcde1401641f8 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal3721828986c0d93618ebcde1401641f8 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.filter.select','data' => ['name' => 'status','label' => 'Status','placeholder' => 'Any status','selected' => $filters['status'],'options' => \App\Enums\ImportStatus::options()]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filter.select'); ?>
<?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(['name' => 'status','label' => 'Status','placeholder' => 'Any status','selected' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($filters['status']),'options' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute(\App\Enums\ImportStatus::options())]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal3721828986c0d93618ebcde1401641f8)): ?>
<?php $attributes = $__attributesOriginal3721828986c0d93618ebcde1401641f8; ?>
<?php unset($__attributesOriginal3721828986c0d93618ebcde1401641f8); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal3721828986c0d93618ebcde1401641f8)): ?>
<?php $component = $__componentOriginal3721828986c0d93618ebcde1401641f8; ?>
<?php unset($__componentOriginal3721828986c0d93618ebcde1401641f8); ?>
<?php endif; ?>
             <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale9f22847d79d6273acb27aff60f1f678)): ?>
<?php $attributes = $__attributesOriginale9f22847d79d6273acb27aff60f1f678; ?>
<?php unset($__attributesOriginale9f22847d79d6273acb27aff60f1f678); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale9f22847d79d6273acb27aff60f1f678)): ?>
<?php $component = $__componentOriginale9f22847d79d6273acb27aff60f1f678; ?>
<?php unset($__componentOriginale9f22847d79d6273acb27aff60f1f678); ?>
<?php endif; ?>
         <?php $__env->endSlot(); ?>

         <?php $__env->slot('head', null, []); ?> 
            <tr>
                <th scope="col">File</th>
                <th scope="col">Entity Type</th>
                <th scope="col">Uploaded By</th>
                <th scope="col">Uploaded On</th>
                <th scope="col">Rows</th>
                <th scope="col">Status</th>
                <th scope="col" class="text-end">Actions</th>
            </tr>
         <?php $__env->endSlot(); ?>

        <?php $__empty_1 = true; $__currentLoopData = $batches; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $batch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr>
                <td>
                    <a href="<?php echo e(route('imports.show', $batch)); ?>" class="text-decoration-none">
                        <div class="ams-cell-primary ams-truncate">
                            <?php echo e($batch->original_filename); ?>

                            <?php if($batch->documents_manifest !== null): ?>
                                <i class="bi bi-paperclip text-secondary"
                                   data-bs-toggle="tooltip"
                                   title="Included a document package"
                                   aria-hidden="true"></i>
                                <span class="visually-hidden">Included a document package</span>
                            <?php endif; ?>
                        </div>
                    </a>
                </td>

                <td class="ams-cell-secondary"><?php echo e($modules[$batch->module] ?? $batch->module); ?></td>

                <td class="ams-cell-secondary"><?php echo e($batch->user?->name ?? 'Unknown'); ?></td>

                <td class="ams-cell-secondary">
                    <?php echo e($batch->created_at?->format(setting('datetime_format', 'd M Y, H:i'))); ?>

                </td>

                <td class="ams-cell-secondary ams-numeric">
                    <?php if($batch->status->isFinished()): ?>
                        <?php echo e($batch->success_rows); ?> / <?php echo e($batch->total_rows); ?>

                    <?php else: ?>
                        <?php echo e($batch->total_rows); ?>

                    <?php endif; ?>
                </td>

                <td>
                    <?php if (isset($component)) { $__componentOriginal8c81617a70e11bcf247c4db924ab1b62 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal8c81617a70e11bcf247c4db924ab1b62 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.status-badge','data' => ['status' => $batch->status]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('status-badge'); ?>
<?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(['status' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($batch->status)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal8c81617a70e11bcf247c4db924ab1b62)): ?>
<?php $attributes = $__attributesOriginal8c81617a70e11bcf247c4db924ab1b62; ?>
<?php unset($__attributesOriginal8c81617a70e11bcf247c4db924ab1b62); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8c81617a70e11bcf247c4db924ab1b62)): ?>
<?php $component = $__componentOriginal8c81617a70e11bcf247c4db924ab1b62; ?>
<?php unset($__componentOriginal8c81617a70e11bcf247c4db924ab1b62); ?>
<?php endif; ?>
                </td>

                <td class="text-end text-nowrap">
                    <?php if (isset($component)) { $__componentOriginalf6c151271844b557d2fb19dbc1eaf516 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf6c151271844b557d2fb19dbc1eaf516 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.table.actions','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('table.actions'); ?>
<?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([]); ?>
                        <a href="<?php echo e(route('imports.show', $batch)); ?>"
                           class="btn btn-sm btn-icon"
                           data-bs-toggle="tooltip"
                           title="View">
                            <i class="bi bi-eye" aria-hidden="true"></i>
                            <span class="visually-hidden">View import</span>
                        </a>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf6c151271844b557d2fb19dbc1eaf516)): ?>
<?php $attributes = $__attributesOriginalf6c151271844b557d2fb19dbc1eaf516; ?>
<?php unset($__attributesOriginalf6c151271844b557d2fb19dbc1eaf516); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf6c151271844b557d2fb19dbc1eaf516)): ?>
<?php $component = $__componentOriginalf6c151271844b557d2fb19dbc1eaf516; ?>
<?php unset($__componentOriginalf6c151271844b557d2fb19dbc1eaf516); ?>
<?php endif; ?>
                </td>
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr>
                <td colspan="7" class="p-0">
                    <?php if (isset($component)) { $__componentOriginal7feb35a4f8daba4e03c8e8875ba34147 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal7feb35a4f8daba4e03c8e8875ba34147 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.table.empty-state','data' => ['icon' => 'file-earmark-arrow-up','title' => $hasFilters ? 'No imports match this filter' : 'No imports yet','message' => $hasFilters ? 'Try clearing the filter to see every import.' : 'Bring an existing spreadsheet of assets, employees or master data into Aumni AMS.']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('table.empty-state'); ?>
<?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(['icon' => 'file-earmark-arrow-up','title' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($hasFilters ? 'No imports match this filter' : 'No imports yet'),'message' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($hasFilters ? 'Try clearing the filter to see every import.' : 'Bring an existing spreadsheet of assets, employees or master data into Aumni AMS.')]); ?>
                        <?php if($hasFilters): ?>
                            <a href="<?php echo e(route('imports.index')); ?>" class="btn btn-outline-secondary">
                                <i class="bi bi-x-lg" aria-hidden="true"></i>Clear filter
                            </a>
                        <?php else: ?>
                            <a href="<?php echo e(route('imports.create')); ?>" class="btn btn-primary">
                                <i class="bi bi-upload" aria-hidden="true"></i>Import
                            </a>
                        <?php endif; ?>
                     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal7feb35a4f8daba4e03c8e8875ba34147)): ?>
<?php $attributes = $__attributesOriginal7feb35a4f8daba4e03c8e8875ba34147; ?>
<?php unset($__attributesOriginal7feb35a4f8daba4e03c8e8875ba34147); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7feb35a4f8daba4e03c8e8875ba34147)): ?>
<?php $component = $__componentOriginal7feb35a4f8daba4e03c8e8875ba34147; ?>
<?php unset($__componentOriginal7feb35a4f8daba4e03c8e8875ba34147); ?>
<?php endif; ?>
                </td>
            </tr>
        <?php endif; ?>

        <?php if($batches->hasPages()): ?>
             <?php $__env->slot('footer', null, []); ?> 
                <?php if (isset($component)) { $__componentOriginalef555f7561cc4f7a54183457568ce48c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalef555f7561cc4f7a54183457568ce48c = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.table.count','data' => ['paginator' => $batches,'noun' => 'import']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('table.count'); ?>
<?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(['paginator' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($batches),'noun' => 'import']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalef555f7561cc4f7a54183457568ce48c)): ?>
<?php $attributes = $__attributesOriginalef555f7561cc4f7a54183457568ce48c; ?>
<?php unset($__attributesOriginalef555f7561cc4f7a54183457568ce48c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalef555f7561cc4f7a54183457568ce48c)): ?>
<?php $component = $__componentOriginalef555f7561cc4f7a54183457568ce48c; ?>
<?php unset($__componentOriginalef555f7561cc4f7a54183457568ce48c); ?>
<?php endif; ?>
                <?php echo e($batches->links()); ?>

             <?php $__env->endSlot(); ?>
        <?php endif; ?>
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalbc878470a37f1c9fbe6952ea2a04bb2b)): ?>
<?php $attributes = $__attributesOriginalbc878470a37f1c9fbe6952ea2a04bb2b; ?>
<?php unset($__attributesOriginalbc878470a37f1c9fbe6952ea2a04bb2b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalbc878470a37f1c9fbe6952ea2a04bb2b)): ?>
<?php $component = $__componentOriginalbc878470a37f1c9fbe6952ea2a04bb2b; ?>
<?php unset($__componentOriginalbc878470a37f1c9fbe6952ea2a04bb2b); ?>
<?php endif; ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /Users/aviii/Desktop/Aumni AMS/resources/views/imports/index.blade.php ENDPATH**/ ?>