@php /** @var \App\Models\Patient $reviewer */ $activityLevels = array_keys(config('smartcarb.activity_levels')); $activityIcons = [ 'sedentary' => 'M4 20h16M6 20V10m4 10V4m4 16v-7m4 7V8', 'lightly_active' => 'M13 5l7 7-7 7M5 5l7 7-7 7', 'moderately_active' => 'M13 10V3L4 14h7v7l9-11h-7z', 'very_active' => 'M12 4a8 8 0 100 16 8 8 0 000-16zm0 3v5l4 2', ]; $activityMults = ['sedentary' => '1.0', 'lightly_active' => '1.5', 'moderately_active' => '1.7', 'very_active' => '1.8']; $goals = ['gluten_free', 'skin_radiance', 'heart_health', 'antioxidants', 'high_fiber', 'high_protein']; $dietIcons = [ 'diabetes' => 'M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z', 'weight-loss' => 'M19 14l-7 7m0 0l-7-7m7 7V3', 'keto' => 'M12 2s5 5.5 5 10a5 5 0 01-10 0c0-4.5 5-10 5-10z', 'muscle-building' => 'M4 12h2m12 0h2M8 12a4 4 0 018 0m-8 0a4 4 0 004 4m0-4a4 4 0 014-4m-4 4a4 4 0 00-4-4', 'maintain-weight' => 'M4.318 6.318a4.5 4.5 0 016.364 0L12 7.636l1.318-1.318a4.5 4.5 0 116.364 6.364L12 21 4.318 12.682a4.5 4.5 0 010-6.364z', ]; $tagValue = fn (string $field) => implode(', ', old($field, $reviewer->{$field}) ?? []); $bmiCategoryLabels = collect(['underweight', 'normal', 'overweight', 'obese_1', 'obese_2', 'obese_3']) ->mapWithKeys(fn ($key) => [$key => __('patients.bmi_category.' . $key)]); $foodGroupLabels = collect(['main_carb', 'fruits', 'milks', 'rich_proteins', 'oils', 'other_fats']) ->mapWithKeys(fn ($key) => [$key => __('onsite.food_' . $key)]); $mealSlotLabels = collect(['breakfast', 'lunch', 'dinner']) ->mapWithKeys(fn ($key) => [$key => __('menus.slots.' . $key)]); @endphp
{{-- Identity --}}

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

{{-- Body --}}

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

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

—

{{ __('common.kg') }}

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

—

—

{{-- Lifestyle --}}

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

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

@foreach ($activityLevels as $level)
{{ __('patients.activity.' . $level) }} × {{ $activityMults[$level] }}
@endforeach

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

@foreach ($dietTypes as $diet)
{{ $diet->name }}
@endforeach
{{-- Fixed at 3 (breakfast/lunch/dinner) — the menu generator only builds those. --}}
{{-- Nutrition preview — same calculations/cards as the onsite-consultation wizard (BMR, TDEE, IBW/BMI, target calories, macro breakdown), but live and read-only on this one page instead of separate wizard steps. Recomputed client-side as body/lifestyle/diet fields change; the authoritative values are (re)computed server-side on save by NutritionCalculator using the exact same formulas. --}}

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

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

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

{{ __('common.kcal') }}

{{--

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

—

{{ __('common.kcal') }}

--}}

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

{{ __('common.kcal') }}

{{--

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

—

—

--}}
@foreach (['protein' => ['bg-brand-50 text-brand-700', 25], 'carbs' => ['bg-amber-50 text-amber-700', 45], 'fat' => ['bg-sky-50 text-sky-700', 30]] as $macro => [$tone, $defaultPct])
@if(app()->getLocale() === 'ar')

0

 {{ __('common.grams') }} @else

0 {{ __('common.grams') }}

@endif

{{ __('patients.' . $macro) }}

0 {{ __('common.kcal') }}

%
@endforeach

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

{{ __('patients.water') }}: — L

{{-- Disliked / allergy exclusions — same component catalogue and picker design as the onsite-consultation wizard's Step 7, reused here via the same `portal.api.components.list` endpoint. Picked ids are stored on the visitor and the menu generator (Components-based) never selects them. --}}

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

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

{{-- Liked components — the flip side of exclusions. When left empty, the generator picks freely from the diet program's whole catalogue (same as before this existed). Once one or more are picked here, the generator restricts itself to ONLY these for every food-group slot (still honouring exclusions on top of that), so the menu is built entirely from what the reviewer likes. Same catalogue/picker as the exclusions section above. --}}

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

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

{{-- Meal distribution — read-only table sourced live from food_group_distributions via the same API the onsite wizard's Step 8 uses, scaled to this visitor's own target calories. --}} {{--

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

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

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

--}} {{-- Meal planner preview — a one-day sample built by the same MenuGenerationService (Components-based) the visitor's real menu will use once saved, shown with the onsite wizard's Step 9 visual language (meal dot + calorie progress bar per meal). Superseded on screen by the day-tabs planner included right below it (_meal_planner_days); kept hidden and unchanged. --}} @include('portal.reviewers._meal_planner_days') {{-- Clinical --}}

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

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

{{--

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

--}}
{{--
--}}