{{-- Day-tabs meal planner — the consultant first picks how many days the
menu covers (1–7), then each day is generated by the same one-day
MenuGenerationService via `portal.api.meal-planner.generate-days`,
which keeps components from repeating across days. Each day sits in
its own tab and can be edited (swap / remove / add) or regenerated on
its own. Save / Save & email submit every day as one visit — see
ReviewerController::syncMenuDaysPreview().
Relies on helpers defined in _form.blade.php's main script
(selectedDietWizardKey, currentTarget, excludedIds, likedIds,
mealSlotLabels, macroChart, componentToItem,
fetchMealComponentsCatalog, renderMealSearchResults). --}}
@php
$daysPlan = ($existingMenuPlan ?? null)?->structure ? $existingMenuPlan : null;
$daysPlanTarget = $daysPlan ? [
'calories' => $daysPlan->target_calories,
'protein_g' => $daysPlan->protein_g,
'carbs_g' => $daysPlan->carbs_g,
'fat_g' => $daysPlan->fat_g,
] : null;
@endphp
@if ($isNewVisit ?? false)