@props(['allCategories' => [], 'quickPills' => [], 'headerMenus' => []]) @php // The toggle below is the All Categories entry, so its /categories menu row is not repeated as a link. $menuLinks = collect($headerMenus)->reject(fn ($menu) => $menu['destination_link'] === '/categories'); // shortcut: categories have no link to pills, so this maps by word and other pills show everything; add a real relation if admins need to edit it. $pillFilters = ['pill-glow-and-go' => 'beauty', 'pill-home-decor' => 'home', 'pill-skin-care' => 'beauty']; // The strip shows short names in this order; any other category follows under its full name. $stripLabels = [ 'all-mens-fashion' => 'Men', 'all-womens-fashion' => 'Women', 'all-mobiles-cameras' => 'Phones', 'all-watches-bags' => 'Watches', 'all-groceries-essentials' => 'Groceries', 'all-home-living' => 'Home & Living', 'all-computers-laptops' => 'Gadgets', 'all-health-beauty' => 'Health & Beauty', 'all-tv-appliances' => 'Appliances', ]; $stripOrder = array_flip(array_keys($stripLabels)); $stripCategories = collect($allCategories)->sortBy(fn ($category) => $stripOrder[$category['slug']] ?? count($stripOrder)); @endphp