@php $hasCoords = $branch->latitude !== null && $branch->longitude !== null; $cityName = optional($branch->city)->city_name; $districtName = optional($branch->district)->district_name; $neighborhoodName = optional($branch->neighbourhood)->neighbourhood_name; $locationLine = collect([$cityName, $districtName])->filter()->implode(' / '); $isActive = (bool) $branch->status; $deactivateBlocked = $deactivateBlocked ?? false; $toggleBlocked = $isActive && $deactivateBlocked; @endphp

{{ $branch->branch_name }}

{{ $isActive ? __('ui.branches.active') : __('ui.branches.passive') }}
@if ($hasCoords) @endif
@if ($locationLine !== '')
{{ $locationLine }}
@endif @if ($neighborhoodName)
{{ $neighborhoodName }}
@endif
{{ $branch->address ?: __('ui.branches.no_address') }}
{{ $branch->branch_phone ?: __('ui.branches.no_phone') }}
@if (! empty($branch->opening_hours))
{{ $branch->opening_hours }}
@endif @unless ($hasCoords)
{{ __('ui.branches.no_location') }}
@endunless