@php /** @var \App\Models\BookingType|null $type */ $fin = $type?->financial; $intg = $type?->integration; $days = [1 => __('Monday'), 2 => __('Tuesday'), 3 => __('Wednesday'), 4 => __('Thursday'), 5 => __('Friday'), 6 => __('Saturday'), 0 => __('Sunday')]; // Group existing availability rules by weekday for pre-render. $rulesByDay = collect($type?->availabilityRules ?? [])->groupBy('weekday'); $tmplByEvent = collect($type?->templates ?? [])->keyBy('event'); $events = ['confirmation' => __('Confirmation'), 'reminder' => __('Reminder'), 'cancellation' => __('Cancellation'), 'reschedule' => __('Reschedule')]; $curInput = strtoupper(old('currency', $fin->currency ?? $defaultCurrency)); // Multi-currency list — DYNAMIC from the admin's active currencies (same source // as /deals and checkout). Ensure the current value is present even if inactive. $currencyList = \App\Models\Currency::active()->orderBy('code')->pluck('code')->map(fn ($c) => strtoupper($c))->all(); if ($curInput && ! in_array($curInput, $currencyList, true)) { array_unshift($currencyList, $curInput); } if (empty($currencyList)) { $currencyList = [$curInput ?: 'USD']; } $isEdit = (bool) $type; @endphp