<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?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): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <!-- Header -->
    <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-6">
        <div>
            <h2 class="text-xl sm:text-2xl font-bold text-slate-800">Import Data</h2>
            <p class="text-slate-500 mt-1 text-sm">Impor transaksi dari file CSV atau sumber lain</p>
        </div>
        <a href="<?php echo e(route('imports.create')); ?>" class="mt-3 sm:mt-0 inline-flex items-center justify-center w-full sm:w-auto px-5 py-2.5 bg-gradient-to-r from-teal-500 to-emerald-500 hover:from-teal-600 hover:to-emerald-600 text-white text-sm font-medium rounded-xl transition shadow-lg shadow-teal-500/30">
            <i class="fas fa-upload mr-2"></i>
            Import Baru
        </a>
    </div>

    <!-- Import History -->
    <div class="bg-white border border-slate-100 rounded-xl sm:rounded-2xl shadow-sm overflow-hidden">
        <!-- Mobile View -->
        <div class="block lg:hidden divide-y divide-slate-100">
            <?php $__empty_1 = true; $__currentLoopData = $imports ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $import): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <div class="p-4">
                    <div class="flex items-start justify-between">
                        <div class="flex items-center">
                            <div class="w-10 h-10 rounded-xl bg-emerald-100 flex items-center justify-center">
                                <i class="fas fa-file-csv text-emerald-600"></i>
                            </div>
                            <div class="ml-3">
                                <p class="font-medium text-slate-800"><?php echo e($import->filename); ?></p>
                                <p class="text-sm text-slate-500"><?php echo e(ucfirst($import->type)); ?></p>
                            </div>
                        </div>
                        <?php switch($import->status):
                            case ('completed'): ?>
                                <span class="text-xs px-2 py-1 rounded-lg bg-emerald-100 text-emerald-700">Selesai</span>
                                <?php break; ?>
                            <?php case ('processing'): ?>
                                <span class="text-xs px-2 py-1 rounded-lg bg-amber-100 text-amber-700">Proses</span>
                                <?php break; ?>
                            <?php case ('failed'): ?>
                                <span class="text-xs px-2 py-1 rounded-lg bg-rose-100 text-rose-700">Gagal</span>
                                <?php break; ?>
                            <?php default: ?>
                                <span class="text-xs px-2 py-1 rounded-lg bg-slate-100 text-slate-600"><?php echo e(ucfirst($import->status)); ?></span>
                        <?php endswitch; ?>
                    </div>
                    <div class="mt-3 flex items-center justify-between text-sm">
                        <span class="text-slate-500">
                            <?php echo e($import->processed_count ?? 0); ?> / <?php echo e($import->total_count ?? 0); ?> data
                        </span>
                        <span class="text-slate-400"><?php echo e($import->created_at->format('d M Y')); ?></span>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <div class="p-12 text-center">
                    <div class="w-16 h-16 bg-slate-100 rounded-2xl flex items-center justify-center mx-auto mb-4">
                        <i class="fas fa-upload text-2xl text-slate-300"></i>
                    </div>
                    <h4 class="font-semibold text-slate-700 mb-2">Belum ada import</h4>
                    <p class="text-slate-500 text-sm mb-4">Impor transaksi dari file CSV atau sumber lain</p>
                    <a href="<?php echo e(route('imports.create')); ?>" class="inline-flex items-center px-4 py-2 bg-teal-500 text-white rounded-xl text-sm font-medium hover:bg-teal-600 transition">
                        <i class="fas fa-plus mr-2"></i>
                        Import Data
                    </a>
                </div>
            <?php endif; ?>
        </div>

        <!-- Desktop Table View -->
        <div class="hidden lg:block overflow-x-auto">
            <table class="w-full">
                <thead class="bg-slate-50">
                    <tr>
                        <th class="px-6 py-3 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider">File</th>
                        <th class="px-6 py-3 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider">Tipe</th>
                        <th class="px-6 py-3 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider">Data</th>
                        <th class="px-6 py-3 text-center text-xs font-semibold text-slate-500 uppercase tracking-wider">Status</th>
                        <th class="px-6 py-3 text-left text-xs font-semibold text-slate-500 uppercase tracking-wider">Tanggal</th>
                        <th class="px-6 py-3 text-right text-xs font-semibold text-slate-500 uppercase tracking-wider">Aksi</th>
                    </tr>
                </thead>
                <tbody class="divide-y divide-slate-100">
                    <?php $__empty_1 = true; $__currentLoopData = $imports ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $import): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="hover:bg-slate-50 transition">
                            <td class="px-6 py-4">
                                <div class="flex items-center">
                                    <div class="w-8 h-8 rounded-lg bg-emerald-100 flex items-center justify-center mr-3">
                                        <i class="fas fa-file-csv text-emerald-600 text-sm"></i>
                                    </div>
                                    <span class="font-medium text-slate-800"><?php echo e($import->filename); ?></span>
                                </div>
                            </td>
                            <td class="px-6 py-4 text-sm text-slate-600">
                                <?php echo e(ucfirst($import->type)); ?>

                            </td>
                            <td class="px-6 py-4 text-center text-sm text-slate-600">
                                <?php echo e($import->processed_count ?? 0); ?> / <?php echo e($import->total_count ?? 0); ?>

                            </td>
                            <td class="px-6 py-4 text-center">
                                <?php switch($import->status):
                                    case ('completed'): ?>
                                        <span class="text-xs px-2.5 py-1 rounded-lg font-medium bg-emerald-100 text-emerald-700">Selesai</span>
                                        <?php break; ?>
                                    <?php case ('processing'): ?>
                                        <span class="text-xs px-2.5 py-1 rounded-lg font-medium bg-amber-100 text-amber-700">Proses</span>
                                        <?php break; ?>
                                    <?php case ('failed'): ?>
                                        <span class="text-xs px-2.5 py-1 rounded-lg font-medium bg-rose-100 text-rose-700">Gagal</span>
                                        <?php break; ?>
                                    <?php default: ?>
                                        <span class="text-xs px-2.5 py-1 rounded-lg font-medium bg-slate-100 text-slate-600"><?php echo e(ucfirst($import->status)); ?></span>
                                <?php endswitch; ?>
                            </td>
                            <td class="px-6 py-4 text-sm text-slate-500">
                                <?php echo e($import->created_at->format('d M Y, H:i')); ?>

                            </td>
                            <td class="px-6 py-4 text-right">
                                <a href="<?php echo e(route('imports.show', $import)); ?>" class="text-teal-600 hover:text-teal-800 font-medium text-sm">
                                    Lihat
                                </a>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr>
                            <td colspan="6" class="px-6 py-12 text-center">
                                <div class="w-16 h-16 bg-slate-100 rounded-2xl flex items-center justify-center mx-auto mb-4">
                                    <i class="fas fa-upload text-2xl text-slate-300"></i>
                                </div>
                                <h4 class="font-semibold text-slate-700 mb-2">Belum ada import</h4>
                                <p class="text-slate-500 text-sm">Impor transaksi dari file CSV atau sumber lain</p>
                            </td>
                        </tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>

        <?php if(isset($imports) && $imports->hasPages()): ?>
            <div class="px-6 py-4 border-t border-slate-100">
                <?php echo e($imports->links()); ?>

            </div>
        <?php endif; ?>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php /**PATH C:\xampp\htdocs\mymoney-app\resources\views\imports\index.blade.php ENDPATH**/ ?>