<?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([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex items-center">
            <a href="<?php echo e(route('imports.create')); ?>" class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 me-4">
                <i class="fas fa-arrow-left"></i>
            </a>
            <h2 class="text-xl font-bold text-gray-900 dark:text-white">
                <?php echo e(__('Preview Import')); ?>

            </h2>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
        <!-- Summary -->
        <div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm p-6 mb-6">
            <div class="grid grid-cols-1 sm:grid-cols-4 gap-4">
                <div class="text-center">
                    <p class="text-3xl font-bold text-gray-900 dark:text-white"><?php echo e($totalRows ?? 0); ?></p>
                    <p class="text-sm text-gray-500">Total Rows</p>
                </div>
                <div class="text-center">
                    <p class="text-3xl font-bold text-green-600"><?php echo e($validRows ?? 0); ?></p>
                    <p class="text-sm text-gray-500">Valid</p>
                </div>
                <div class="text-center">
                    <p class="text-3xl font-bold text-red-600"><?php echo e($errorRows ?? 0); ?></p>
                    <p class="text-sm text-gray-500">Errors</p>
                </div>
                <div class="text-center">
                    <p class="text-3xl font-bold text-yellow-600"><?php echo e($duplicateRows ?? 0); ?></p>
                    <p class="text-sm text-gray-500">Duplicates</p>
                </div>
            </div>
        </div>

        <!-- Preview Table -->
        <div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm overflow-hidden mb-6">
            <div class="overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
                    <thead class="bg-gray-50 dark:bg-gray-900">
                        <tr>
                            <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Status</th>
                            <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Date</th>
                            <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Description</th>
                            <th class="px-4 py-3 text-right text-xs font-medium text-gray-500 uppercase">Amount</th>
                            <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Type</th>
                            <th class="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase">Category</th>
                        </tr>
                    </thead>
                    <tbody class="divide-y divide-gray-100 dark:divide-gray-700">
                        <?php $__currentLoopData = $preview ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr class="<?php echo e($row['status'] === 'error' ? 'bg-red-50 dark:bg-red-900/10' : ''); ?>">
                                <td class="px-4 py-3">
                                    <?php if($row['status'] === 'valid'): ?>
                                        <span class="text-green-500"><i class="fas fa-check-circle"></i></span>
                                    <?php elseif($row['status'] === 'duplicate'): ?>
                                        <span class="text-yellow-500"><i class="fas fa-exclamation-circle"></i></span>
                                    <?php else: ?>
                                        <span class="text-red-500" title="<?php echo e($row['error'] ?? ''); ?>"><i class="fas fa-times-circle"></i></span>
                                    <?php endif; ?>
                                </td>
                                <td class="px-4 py-3 text-sm text-gray-900 dark:text-white"><?php echo e($row['date'] ?? ''); ?></td>
                                <td class="px-4 py-3 text-sm text-gray-900 dark:text-white"><?php echo e($row['description'] ?? ''); ?></td>
                                <td class="px-4 py-3 text-sm text-right <?php echo e(($row['type'] ?? '') === 'expense' ? 'text-red-600' : 'text-green-600'); ?>">
                                    <?php echo e(number_format($row['amount'] ?? 0, 0, ',', '.')); ?>

                                </td>
                                <td class="px-4 py-3 text-sm text-gray-600 dark:text-gray-400"><?php echo e(ucfirst($row['type'] ?? '')); ?></td>
                                <td class="px-4 py-3 text-sm text-gray-600 dark:text-gray-400"><?php echo e($row['category'] ?? ''); ?></td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>

        <!-- Actions -->
        <div class="flex items-center justify-end space-x-4">
            <a href="<?php echo e(route('imports.create')); ?>" class="px-4 py-2 text-gray-600 hover:text-gray-800">
                <i class="fas fa-arrow-left me-2"></i>Back
            </a>
            <form action="<?php echo e(route('imports.process')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="import_id" value="<?php echo e($importId ?? ''); ?>">
                <?php if (isset($component)) { $__componentOriginald411d1792bd6cc877d687758b753742c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald411d1792bd6cc877d687758b753742c = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.primary-button','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('primary-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([]); ?>
                    <i class="fas fa-check me-2"></i>Import <?php echo e($validRows ?? 0); ?> Rows
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald411d1792bd6cc877d687758b753742c)): ?>
<?php $attributes = $__attributesOriginald411d1792bd6cc877d687758b753742c; ?>
<?php unset($__attributesOriginald411d1792bd6cc877d687758b753742c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald411d1792bd6cc877d687758b753742c)): ?>
<?php $component = $__componentOriginald411d1792bd6cc877d687758b753742c; ?>
<?php unset($__componentOriginald411d1792bd6cc877d687758b753742c); ?>
<?php endif; ?>
            </form>
        </div>
    </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\preview.blade.php ENDPATH**/ ?>