{{-- Shared location details — venue name, address, the Waze/Google Maps links, an online join link (for online/hybrid events), and (when coordinates are configured) a live, interactive OpenStreetMap. Reused by the home Location section and the Location popup so they always show identical details. All values come from the wedding/event settings; nothing is hardcoded. Props: - $map (bool, default true): render the interactive map when coords exist. --}} @props(['map' => true]) @php($settings = app(\App\Settings\WeddingSettings::class)) @php($wording = app(\App\Services\LandingPageWording::class)) @php($showsVenue = $settings->showsVenue()) @php($showsOnline = $settings->showsOnlineLink()) @php($hasCoords = is_numeric($settings->venue_lat) && is_numeric($settings->venue_lng)) {{-- Without coordinates we can still show a live map by querying the venue address (falling back to its name). Both come from the event settings. --}} @php($mapQuery = trim((string) $settings->venue_address) !== '' ? $settings->venue_address : (string) $settings->venue_name) @if ($showsVenue && $map && $hasCoords) @php($lat = (float) $settings->venue_lat) @php($lng = (float) $settings->venue_lng) @php($bbox = ($lng - 0.012).','.($lat - 0.008).','.($lng + 0.012).','.($lat + 0.008))
{{-- Precise pin from coordinates (OpenStreetMap). --}}
@elseif ($showsVenue && $map && trim($mapQuery) !== '')
{{-- Interactive map from the address — no coordinates or API key needed. --}}
@endif @if ($showsVenue && trim((string) $settings->venue_name) !== '')

{{ $settings->venue_name }}

{{ $settings->venue_address }}

@elseif ($showsOnline)

{{ $wording('landing.location.online_heading') }}

{{ $wording('landing.location.online_description') }}

@endif
@if ($showsOnline) {{ $wording('landing.location.join_button') }} @endif @if ($showsVenue && $settings->venue_waze_url) {{ $wording('landing.location.waze_button') }} @endif @if ($showsVenue && $settings->venue_map_url) {{ $wording('landing.location.maps_button') }} @endif