<?php $__env->startSection('title', 'Save The Food Products'); ?>

<?php $__env->startSection('content'); ?>
    <div class="flex justify-between items-center mb-6">
        <h1 class="text-2xl font-bold">Save The Food Products</h1>
        <a href="<?php echo e(route('admin.save-the-food-products.create')); ?>" class="bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700">Add</a>
    </div>

    <div class="bg-white rounded-lg shadow overflow-hidden">
        <table class="w-full">
            <thead class="bg-gray-50">
                <tr>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">ID</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Product</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Discount %</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Stock</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Expires</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Featured</th>
                    <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">Actions</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-gray-200">
                <?php $__empty_1 = true; $__currentLoopData = $saveTheFoodProducts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $stf): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr class="hover:bg-gray-50">
                        <td class="px-6 py-4"><?php echo e($stf->id); ?></td>
                        <td class="px-6 py-4"><?php echo e($stf->product?->name ?? 'N/A'); ?></td>
                        <td class="px-6 py-4"><?php echo e($stf->discount_percentage); ?>%</td>
                        <td class="px-6 py-4"><?php echo e($stf->stock_remaining); ?></td>
                        <td class="px-6 py-4"><?php echo e($stf->expires_at ? \Carbon\Carbon::parse($stf->expires_at)->format('Y-m-d') : '-'); ?></td>
                        <td class="px-6 py-4"><?php echo e($stf->is_featured ? 'Yes' : 'No'); ?></td>
                        <td class="px-6 py-4 space-x-2">
                            <a href="<?php echo e(route('admin.save-the-food-products.edit', $stf->id)); ?>" class="text-blue-600 hover:underline">Edit</a>
                            <form action="<?php echo e(route('admin.save-the-food-products.destroy', $stf->id)); ?>" method="POST" class="inline" onsubmit="return confirm('Delete?')">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('DELETE'); ?>
                                <button type="submit" class="text-red-600 hover:underline">Delete</button>
                            </form>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="7" class="px-6 py-4 text-center text-gray-500">No save the food products found.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
    <div class="mt-4"><?php echo e($saveTheFoodProducts->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin::layouts.master', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH G:\abo bilal nuisan\bernie_store\bernie-backend\Modules/Admin\resources/views/save-the-food-products/index.blade.php ENDPATH**/ ?>