@php $infoBranch = null; $requestedBranchId = (int) ($s['branch_id'] ?? 0); if ($requestedBranchId > 0) { $infoBranch = \App\Models\Branch::query()->active()->find($requestedBranchId); } if (! $infoBranch && ! empty($branch) && $branch->is_active) { $infoBranch = $branch; } if (! $infoBranch) { $infoBranch = \App\Models\Branch::query()->active()->first(); } $style = $s['style'] ?? 'cream'; $sectionClass = match ($style) { 'sand' => 'section bg-sand', 'white' => 'section bg-white', 'dark' => 'section bg-ink', default => 'section', }; $showMap = (bool) ($s['show_map'] ?? true); $hasMap = $infoBranch && $showMap && $infoBranch->hasLocation(); $eyebrow = $block->text('eyebrow'); $title = $block->text('title'); $subtitle = $block->text('subtitle'); $heading = $title !== '' ? $title : ($infoBranch?->tr('name') ?? ''); @endphp @if ($infoBranch)
@if ($eyebrow !== '' || $heading !== '' || $subtitle !== '')
@if ($eyebrow !== '') {{ $eyebrow }} @endif @if ($heading !== '')

{{ $heading }}

@endif @if ($subtitle !== '')

{{ $subtitle }}

@endif
@endif

{{ $infoBranch->tr('name') }}

{{ $infoBranch->tr('address') }}

@php($openNow = $infoBranch->isOpenNow()) @if ($openNow === null) {{ __('contact.hours_unavailable') }} @else {{ $openNow ? __('contact.open_now') : __('contact.closed_now') }} @endif
@if ($infoBranch->tr('working_hours') || $infoBranch->phoneList() !== [] || $infoBranch->whatsapp_url || $infoBranch->email)
@if ($infoBranch->tr('working_hours'))
{{ __('contact.hours') }}
{{ $infoBranch->tr('working_hours') }}
@endif @if ($infoBranch->phoneList() !== [])
{{ __('contact.branch_phone') }}
@foreach ($infoBranch->phoneList() as $phone) {{ $phone }} @endforeach
@endif @if ($infoBranch->whatsapp_url)
{{ __('contact.whatsapp') }}
{{ $infoBranch->whatsapp }}
@endif @if ($infoBranch->email)
{{ __('contact.branch_email') }}
{{ $infoBranch->email }}
@endif
@endif
@if (empty($branch) || (int) $branch->id !== (int) $infoBranch->id) {{ __('contact.branch_view') }} @endif @if ($infoBranch->hasLocation()) {{ __('contact.branch_directions') }} ↗ @endif
@if ($showMap)
@if ($hasMap) {{ __('contact.branch_view_map') }} ↗ @else

{{ __('contact.branch_no_location') }}

@endif
@endif
@once @push('head') @endpush @push('scripts') @endpush @endonce @endif