<?php $__blaze->ensureRequired('/Users/sbs/Downloads/Archive 13/resources/views/components/layouts/portal.blade.php', $__blaze->compiledPath.'/54f5ac09180420401b42f31ddcebfb06.php'); ?>
<?php if (isset($__slots54f5ac09180420401b42f31ddcebfb06)) { $__slotsStack54f5ac09180420401b42f31ddcebfb06[] = $__slots54f5ac09180420401b42f31ddcebfb06; } ?>
<?php if (isset($__attrs54f5ac09180420401b42f31ddcebfb06)) { $__attrsStack54f5ac09180420401b42f31ddcebfb06[] = $__attrs54f5ac09180420401b42f31ddcebfb06; } ?>
<?php $__attrs54f5ac09180420401b42f31ddcebfb06 = ['title' => 'Menu Management','pageTitle' => 'Restaurant Menu']; ?>
<?php $__slots54f5ac09180420401b42f31ddcebfb06 = []; ?>
<?php $__blaze->pushData($__attrs54f5ac09180420401b42f31ddcebfb06); ?>
<?php ob_start(); ?>

<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8 gap-4">
    <div>
        <h2 class="text-xs font-bold text-zinc-500 uppercase tracking-widest">Inventory</h2>
        <p class="text-[10px] text-zinc-400 mt-0.5">Manage your dishes, drinks, and prices.</p>
    </div>
    <div class="flex items-center space-x-3 w-full md:w-auto">
        <form action="<?php echo e(route('portal.items.index')); ?>" method="GET" class="flex-1 md:flex-none flex items-center space-x-2">
            <div class="relative flex-1">
                <input type="text" name="search" value="<?php echo e(request('search')); ?>" placeholder="Search items..." 
                    class="w-full md:w-48 px-3 py-1.5 bg-white border border-zinc-200 rounded-sm text-[10px] uppercase font-bold tracking-tight focus:outline-hidden focus:border-amber-500/50">
                <button type="submit" class="absolute right-2 top-1.5 text-zinc-400">
                    <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
                </button>
            </div>
            
            <select name="category_id" onchange="this.form.submit()" 
                class="px-3 py-1.5 bg-white border border-zinc-200 rounded-sm text-[10px] uppercase font-bold tracking-tight focus:outline-hidden focus:border-amber-500/50">
                <option value="">All Categories</option>
                <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <option value="<?php echo e($category->id); ?>" <?php echo e(request('category_id') == $category->id ? 'selected' : ''); ?>>
                        <?php echo e($category->name); ?>

                    </option>
                    <?php $__currentLoopData = $category->children; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $child): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($child->id); ?>" <?php echo e(request('category_id') == $child->id ? 'selected' : ''); ?>>
                            &nbsp;&nbsp;↳ <?php echo e($child->name); ?>

                        </option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
        </form>
        <?php $__blaze->ensureRequired('/Users/sbs/Downloads/Archive 13/resources/views/components/button.blade.php', $__blaze->compiledPath.'/feae8bf83b9dbafc90ffca48c0a1d0dc.php'); ?>
<?php if (isset($__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc)) { $__slotsStackfeae8bf83b9dbafc90ffca48c0a1d0dc[] = $__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc; } ?>
<?php if (isset($__attrsfeae8bf83b9dbafc90ffca48c0a1d0dc)) { $__attrsStackfeae8bf83b9dbafc90ffca48c0a1d0dc[] = $__attrsfeae8bf83b9dbafc90ffca48c0a1d0dc; } ?>
<?php $__attrsfeae8bf83b9dbafc90ffca48c0a1d0dc = ['href' => route('portal.items.create')]; ?>
<?php $__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc = []; ?>
<?php $__blaze->pushData($__attrsfeae8bf83b9dbafc90ffca48c0a1d0dc); ?>
<?php ob_start(); ?>
            Add New Item
        <?php $__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc['slot'] = new \Illuminate\View\ComponentSlot(trim(ob_get_clean()), []); ?>
<?php $__blaze->pushSlots($__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc); ?>
<?php _feae8bf83b9dbafc90ffca48c0a1d0dc($__blaze, $__attrsfeae8bf83b9dbafc90ffca48c0a1d0dc, $__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc, ['href'], [], $__this ?? (isset($this) ? $this : null)); ?>
<?php if (! empty($__slotsStackfeae8bf83b9dbafc90ffca48c0a1d0dc)) { $__slotsfeae8bf83b9dbafc90ffca48c0a1d0dc = array_pop($__slotsStackfeae8bf83b9dbafc90ffca48c0a1d0dc); } ?>
<?php if (! empty($__attrsStackfeae8bf83b9dbafc90ffca48c0a1d0dc)) { $__attrsfeae8bf83b9dbafc90ffca48c0a1d0dc = array_pop($__attrsStackfeae8bf83b9dbafc90ffca48c0a1d0dc); } ?>
<?php $__blaze->popData(); ?>
    </div>
</div>



<div class="space-y-10">
    <?php $__empty_1 = true; $__currentLoopData = $items->groupBy('category_id'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $categoryId => $categoryItems): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <?php $category = $categoryItems->first()->category; ?>
        <div>
            <div class="flex items-center mb-6">
                <div class="bg-amber-600 h-5 w-1 rounded-full mr-3 shadow-lg shadow-amber-900/20"></div>
                <h3 class="text-[11px] font-black text-zinc-900 uppercase tracking-widest"><?php echo e($category->name ?? 'Uncategorized'); ?></h3>
                <span class="ml-4 flex-1 h-[1px] bg-zinc-200"></span>
                <span class="ml-4 text-[9px] font-bold text-zinc-400 uppercase tracking-tighter"><?php echo e($categoryItems->count()); ?> Items</span>
            </div>
            
            <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4">
                <?php $__currentLoopData = $categoryItems; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php $__blaze->ensureRequired('/Users/sbs/Downloads/Archive 13/resources/views/components/item-card.blade.php', $__blaze->compiledPath.'/45cf444fa8f8313b037ee513d7eb396d.php'); ?>
<?php $__blaze->pushData(['item' => $item]); ?>
<?php _45cf444fa8f8313b037ee513d7eb396d($__blaze, ['item' => $item], [], ['item'], [], $__this ?? (isset($this) ? $this : null)); ?>
<?php $__blaze->popData(); ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <div class="py-24 text-center bg-white border border-zinc-200 rounded-sm shadow-sm">
            <div class="opacity-20 mb-4">
                <svg class="w-16 h-16 mx-auto text-zinc-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path></svg>
            </div>
            <h3 class="text-xs font-bold text-zinc-500 uppercase tracking-widest">No Items Found</h3>
            <p class="text-[10px] text-zinc-400 mt-2">Try adjusting your filters or add your first menu item.</p>
        </div>
    <?php endif; ?>
</div>

<div class="mt-8">
    <?php echo e($items->links()); ?>

</div>

<?php $__slots54f5ac09180420401b42f31ddcebfb06['slot'] = new \Illuminate\View\ComponentSlot(trim(ob_get_clean()), []); ?>
<?php $__blaze->pushSlots($__slots54f5ac09180420401b42f31ddcebfb06); ?>
<?php _54f5ac09180420401b42f31ddcebfb06($__blaze, $__attrs54f5ac09180420401b42f31ddcebfb06, $__slots54f5ac09180420401b42f31ddcebfb06, [], ['pageTitle' => 'page-title'], $__this ?? (isset($this) ? $this : null)); ?>
<?php if (! empty($__slotsStack54f5ac09180420401b42f31ddcebfb06)) { $__slots54f5ac09180420401b42f31ddcebfb06 = array_pop($__slotsStack54f5ac09180420401b42f31ddcebfb06); } ?>
<?php if (! empty($__attrsStack54f5ac09180420401b42f31ddcebfb06)) { $__attrs54f5ac09180420401b42f31ddcebfb06 = array_pop($__attrsStack54f5ac09180420401b42f31ddcebfb06); } ?>
<?php $__blaze->popData(); ?>
<?php /**PATH /Users/sbs/Downloads/Archive 13/resources/views/portal/items/index.blade.php ENDPATH**/ ?>