<?php $__env->startSection('title', 'Flash Sales'); ?>
<?php $__env->startSection('content'); ?>
<div class="action-bar">
    <span><?php echo e($flashSales->total()); ?> flash sales</span>
    <a href="<?php echo e(route('admin.flash-sales.create')); ?>" class="btn btn-primary">+ New Flash Sale</a>
</div>
<div class="card">
    <table>
        <tr><th>Title</th><th>Discount</th><th>Badge</th><th>Period</th><th>Order</th><th>Active</th><th>Actions</th></tr>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $flashSales; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
        <tr>
            <td><strong><?php echo e($sale->title); ?></strong><br><span class="text-muted"><?php echo e(Str::limit($sale->description, 60)); ?></span></td>
            <td><?php echo e($sale->discount_percentage ? $sale->discount_percentage.'%' : '—'); ?></td>
            <td><?php echo e($sale->badge_text ?? '—'); ?></td>
            <td>
                <?php echo e($sale->start_date ? $sale->start_date->format('M j, Y') : '—'); ?>

                &rarr;
                <?php echo e($sale->end_date ? $sale->end_date->format('M j, Y') : '∞'); ?>

            </td>
            <td><?php echo e($sale->order); ?></td>
            <td><?php echo $sale->is_active ? '<span style="color:#6fcf97">Yes</span>' : '<span style="color:#e74c3c">No</span>'; ?></td>
            <td class="inline-flex">
                <a href="<?php echo e(route('admin.flash-sales.edit', $sale)); ?>" class="btn btn-primary btn-sm">Edit</a>
                <form action="<?php echo e(route('admin.flash-sales.destroy', $sale)); ?>" method="POST" onsubmit="return confirm('Delete?')">
                    <?php echo csrf_field(); ?> <?php echo method_field('DELETE'); ?>
                    <button type="submit" class="btn btn-danger btn-sm">Delete</button>
                </form>
            </td>
        </tr>
        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
    </table>
    <div class="pagination"><?php echo e($flashSales->links()); ?></div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\diag\autodiag\resources\views/admin/flash-sales/index.blade.php ENDPATH**/ ?>