@php
$orderStats = getRestaurantOrderStats(branch()->id);
$orderLimitReached = !$orderStats['unlimited'] && $orderStats['current_count'] >= $orderStats['order_limit'];
$posMenuClientSideCatalog = (bool) ($posMenuClientSideCatalog ?? false);
$posCategoryMeta = [];
foreach ($categoryList ?? [] as $category) {
$posCategoryMeta[(string) $category->id] = [
'name' => $category->category_name,
'sort_order' => (int) ($category->sort_order ?? $category->id),
];
}
$posEuSelectableMenuInput = restaurant()->selectableEuAllergenKeys();
$posDietaryLabelOrder = \App\Support\DietaryLabels::keys();
$posDietaryLabelText = [];
$posDietaryLabelIconUrls = [];
foreach ($posDietaryLabelOrder as $k) {
$posDietaryLabelText[$k] = __(\App\Support\DietaryLabels::langKey($k));
$posDietaryLabelIconUrls[$k] = \App\Support\DietaryLabels::defaultIconUrl($k);
}
@endphp
{{-- Mobile: cart bar + menu FAB side by side (no overlap on narrow screens). --}}
{{-- pointer-events-none on the full-width row so cart action buttons underneath stay tappable; only FAB/cart chip capture touches. --}}
@lang('modules.order.viewCart')
@php
$posMenuScriptBootstrap = [
'posMenuClientSideCatalog' => (bool) $posMenuClientSideCatalog,
'posCategoryMeta' => $posCategoryMeta,
'posMenuItemIconBase' => rtrim((string) asset('img'), '/'),
'posDietaryLabelOrder' => $posDietaryLabelOrder,
'posDietaryLabelText' => $posDietaryLabelText,
'posDietaryLabelIconUrls' => $posDietaryLabelIconUrls,
'posDietaryLabelsAria' => __('modules.menu.dietaryLabelsSectionTitle'),
];
@endphp