{{-- 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)
{{ __('patients.new_visit_hint') }}
@elseif ($existingMenuPlan ?? null)
{{ __('patients.editing_visit_hint', ['date' => $existingMenuPlan->starts_on?->format('Y-m-d') ?? $existingMenuPlan->created_at->format('Y-m-d')]) }}
@endif

{{ __('patients.section_meal_planner_days') }}

{{ __('patients.meal_planner_days_hint') }}

{{ __('patients.menu_days_count') }}
@for ($n = 1; $n <= \App\Services\MultiDayMenuGenerationService::MAX_DAYS; $n++) @endfor
{{-- Which visit Save writes to — blank inserts a new visit. --}}