

<?php $__env->startSection('backend_content'); ?>
    <div class="container-fluid">
        <div class="d-flex justify-content-between align-items-center mb-4">
            <div>
                <h4 class="fw-bold mb-1">Food Cart Management</h4>
                <small class="text-muted">Create your carts and manage their food menus.</small>
            </div>
            <a href="<?php echo e(route('admin.food-carts.create')); ?>" class="btn btn-primary">
                <i class="bx bx-plus"></i> Add Food Cart
            </a>
        </div>

        <div class="card border-0 shadow-sm">
            <div class="table-responsive">
                <table class="table table-hover mb-0">
                    <thead class="table-light">
                        <tr>
                            <th>Cart</th>
                            <th>Status</th>
                            <th>Items</th>
                            <th>Owner</th>
                            <th class="text-end">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $foodCarts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $foodCart): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <tr>
                                <td>
                                    <div class="d-flex align-items-center gap-2">
                                        <?php if($foodCart->logo): ?>
                                            <img src="<?php echo e(asset('storage/' . $foodCart->logo)); ?>" alt="<?php echo e($foodCart->name); ?>"
                                                class="rounded" style="width:44px;height:44px;object-fit:cover;">
                                        <?php else: ?>
                                            <div class="bg-light border rounded d-flex align-items-center justify-content-center"
                                                style="width:44px;height:44px;">
                                                <i class="bx bx-restaurant"></i>
                                            </div>
                                        <?php endif; ?>
                                        <div>
                                            <div class="fw-semibold"><?php echo e($foodCart->name); ?></div>
                                            <small class="text-muted"><?php echo e($foodCart->slug); ?></small>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <?php if($foodCart->is_active): ?>
                                        <span class="badge bg-success">Active</span>
                                    <?php else: ?>
                                        <span class="badge bg-secondary">Hidden</span>
                                    <?php endif; ?>
                                </td>
                                <td><span class="badge bg-light text-dark"><?php echo e($foodCart->available_items_count); ?>

                                        items</span>
                                </td>
                                <td><?php echo e($foodCart->creator?->name ?? 'N/A'); ?></td>
                                <td class="text-end">
                                    <div class="btn-group">
                                        <a href="<?php echo e(route('storefront.food-carts.show', $foodCart)); ?>" target="_blank"
                                            class="btn btn-sm btn-outline-info" title="View">
                                            <i class="bx bx-show"></i>
                                        </a>
                                        <a href="<?php echo e(route('admin.food-carts.items.index', $foodCart)); ?>"
                                            class="btn btn-sm btn-outline-primary" title="Menu Items">
                                            <i class="bx bx-food-menu"></i>
                                        </a>
                                        <a href="<?php echo e(route('admin.food-carts.edit', $foodCart)); ?>"
                                            class="btn btn-sm btn-outline-warning" title="Edit">
                                            <i class="bx bx-edit"></i>
                                        </a>
                                        <form action="<?php echo e(route('admin.food-carts.destroy', $foodCart)); ?>" method="POST"
                                            onsubmit="return confirm('Delete this cart and all its items?');">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('DELETE'); ?>
                                            <button type="submit" class="btn btn-sm btn-outline-danger" title="Delete">
                                                <i class="bx bx-trash"></i>
                                            </button>
                                        </form>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="5" class="text-center text-muted py-5">No food carts yet. Add your first
                                    cart.</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('backend.layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Abdur Rahman\Desktop\faa\resources\views/backend/food-carts/index.blade.php ENDPATH**/ ?>