@extends('layouts.app') @push('head') @endpush @php $translation = $park->translations->firstWhere('locale', app()->getLocale()) ?? $park->translations->firstWhere('locale', 'en'); $parkName = $translation?->name ?: $park->official_name; $description = $translation?->description ?: $translation?->summary; $parkLiveState = $parkOperatingState['state'] ?? 'unknown'; $isParkOpen = ($parkOperatingState['is_open'] ?? null) === true; $todayOpen = $parkOperatingState['opens_at'] ?? $todayHours?->opens_at?->timezone($park->timezone); $todayClose = $parkOperatingState['closes_at'] ?? $todayHours?->closes_at?->timezone($park->timezone); $parkLiveStateLabel = match($parkLiveState) { 'open' => __('ui.park_status_open_now'), 'opening_later' => __('ui.park_status_opening_later'), 'closed' => __('ui.park_status_closed_now'), default => __('ui.park_status_unknown_now'), }; $hasLive = $freshLiveCount > 0; $lat = $location?->latitude; $lng = $location?->longitude; $parkTypeLabel = __('ui.admin_park_type_'.$park->park_type); $parkNameLength = mb_strlen($parkName); $parkNameSizeClass = $parkNameLength >= 30 ? 'is-name-very-long' : ($parkNameLength >= 20 ? 'is-name-long' : ''); @endphp @section('title', $parkName.' — Coaster World') @if($bannerUrl) @push('head') @endpush @endif @section('content') @if(session('gps_status'))
{{ session('gps_status') }}
@endif @if($errors->has('gps'))
{{ $errors->first('gps') }}
@endif
@if($park->country?->official_name) @endif @if($park->city) · {{ $park->city }} @endif

{{ $parkName }}

{{ $parkTypeLabel }} {{ $parkLiveStateLabel }}
{{ __('ui.park_opening_hours') }} {{ $todayOpen && $todayClose ? $todayOpen->format('H:i').'–'.$todayClose->format('H:i') : __('ui.park_hours_unavailable') }}
{{ __('ui.park_weather') }} @if($weather?->temperature_c !== null) {{ $weatherConditionIcon }} {{ rtrim(rtrim(number_format((float) $weather->temperature_c, 1, ',', ''), '0'), ',') }}°C @else — @endif
{{ __('ui.park_coasters') }} {{ $coasters->count() }}
{{ __('ui.park_attractions') }} {{ $otherAttractions->count() }}
{{ __('ui.park_live') }} {{ $hasLive ? $openLiveCount.'/'.$freshLiveCount : '—' }}
@if($hasLive) {{ __('ui.park_live_now') }} @endif {{ __('ui.park_see_attractions') }} {{ __('ui.park_map_open') }} @auth @if($activeVisit) {{ $activeVisit->park_id === $park->id ? __('ui.visit_resume') : __('ui.visit_active_elsewhere') }} @else
user()->is_admin) data-gps-required data-gps-kind="visit" data-gps-loading="{{ __('ui.gps_locating') }}" data-gps-unavailable="{{ __('ui.gps_unavailable') }}" data-gps-denied="{{ __('ui.gps_permission_denied') }}" data-gps-timeout="{{ __('ui.gps_timeout') }}" data-gps-error="{{ __('ui.gps_error') }}" @endif>@csrf
@endif @endauth @if($park->ticket_url || auth()->check())
@auth @endauth
{{ __('ui.park_more_actions') }}
@auth @if(auth()->user()->is_admin) {{ __('ui.admin_edit_park') }} @endif @endauth @if($park->ticket_url) {{ __('ui.park_tickets') }} @endif @auth
@csrf
@if($plannedVisit) {{ __('ui.plan_planned_for', ['date' => $plannedVisit->starts_on->format('d/m/Y')]) }} @else
{{ __('ui.plan_visit') }}
@csrf
@endif @if(!$isVisited)
user()->is_admin) data-gps-required data-gps-kind="visit" data-gps-loading="{{ __('ui.gps_locating') }}" data-gps-unavailable="{{ __('ui.gps_unavailable') }}" data-gps-denied="{{ __('ui.gps_permission_denied') }}" data-gps-timeout="{{ __('ui.gps_timeout') }}" data-gps-error="{{ __('ui.gps_error') }}" @endif>@csrf
@else ✓ {{ __('ui.collection_visited') }} @endif {{ __('ui.contribution_propose') }} @include('pages.partials.community-photo-upload', ['photoType' => 'park', 'photoId' => $park->id]) @endauth
@endif
{{ __('ui.park_opening_calendar_kicker') }}

{{ __('ui.park_opening_calendar_compact_title') }}

{{ $calendarRangeLabel }}
@foreach($openingCalendar as $calendarDay) @php $fullHours = $calendarDay['periods']->join(' · '); $dayLabel = mb_strtoupper(mb_substr($calendarDay['date']->copy()->locale(app()->getLocale())->translatedFormat('D'), 0, 2)); $compactPeriodParts = is_string($calendarDay['compact_period']) ? preg_split('/\s+–\s+/u', $calendarDay['compact_period'], 2) : []; @endphp
@if($calendarDay['is_today']) @endif @if($calendarDay['date']->day === 1) {{ mb_strtoupper(mb_substr($calendarDay['date']->copy()->locale(app()->getLocale())->translatedFormat('M'), 0, 3)) }} @endif
@if($calendarDay['state'] === 'open') @if(count($compactPeriodParts) === 2) {{ $compactPeriodParts[0] }} – {{ $compactPeriodParts[1] }} @else {{ $calendarDay['compact_period'] }} @endif @if($calendarDay['periods']->count() > 1) + @endif @elseif($calendarDay['state'] === 'closed') {{ __('ui.park_calendar_closed') }} @else @endif
@endforeach
@include('pages.partials.community-tips') @if(session('community_photo_status') === 'submitted')
{{ __('ui.community_photo_submitted') }}
@endif
@if(session('park_presence_status'))
{{ session('park_presence_status') }}
@endif
{{ __('ui.park_presence_kicker') }}

{{ __('ui.park_presence_title') }}

{{ __('ui.park_presence_intro') }}

{{ $visiblePresences->count() }} {{ __('ui.park_presence_visible_now') }}
@auth
{{ $friendPresenceCount }} {{ __('ui.park_presence_friends_here') }}
@endauth
{{ __('ui.park_presence_privacy_note') }}
@auth @if($currentPresence)
● {{ __('ui.park_presence_active') }} {{ __('ui.park_presence_you_are_here') }} {{ __('ui.park_presence_since', ['time' => $currentPresence->started_at?->timezone($park->timezone)->format('H:i')]) }}
@csrf @method('PUT')
@csrf @method('DELETE')
@else {{ __('ui.park_presence_checkin_title') }}

{{ __('ui.park_presence_checkin_help') }}

user()->is_admin) data-gps-required data-gps-kind="visit" data-gps-loading="{{ __('ui.gps_locating') }}" data-gps-unavailable="{{ __('ui.gps_unavailable') }}" data-gps-denied="{{ __('ui.gps_permission_denied') }}" data-gps-timeout="{{ __('ui.gps_timeout') }}" data-gps-error="{{ __('ui.gps_error') }}" @endif> @csrf
@endif @else {{ __('ui.park_presence_guest_title') }}

{{ __('ui.park_presence_guest_help') }}

{{ __('ui.auth_login') }} @endauth
@if($visiblePresences->isNotEmpty())
{{ __('ui.park_presence_people_title') }} {{ __('ui.park_presence_people_help') }}
@foreach($visiblePresences->take(8) as $presence) @php $presenceUser = $presence->user; $presenceName = $presenceUser?->username ? '@'.$presenceUser->username : $presenceUser?->name; @endphp
{{ mb_strtoupper(mb_substr($presenceName ?: '?', 0, 1)) }}
{{ $presenceName }} {{ $presence->visibility === 'friends' ? __('ui.park_presence_visible_friends') : __('ui.park_presence_visible_public') }}
@endforeach
@endif
@if(session('ride_together_status'))
{{ session('ride_together_status') }}
@endif @if($errors->has('ride_together') || $errors->has('scheduled_for'))
{{ $errors->first() }}
@endif
{{ __('ui.ride_together_kicker') }}

{{ __('ui.ride_together_title') }}

{{ __('ui.ride_together_intro') }}

@auth @endauth
@auth @endauth @if($rideTogetherPosts->isNotEmpty())
@foreach($rideTogetherPosts as $ridePost) @php $rideAttraction = $ridePost->attraction; $rideTranslation = $rideAttraction?->translations?->firstWhere('locale', app()->getLocale()) ?? $rideAttraction?->translations?->firstWhere('locale', 'en'); $rideName = $rideTranslation?->name ?: $rideAttraction?->official_name; $joined = $ridePost->participants->where('status', 'joined')->count(); $isMine = auth()->check() && $ridePost->created_by_user_id === auth()->id(); $iJoined = auth()->check() && $ridePost->participants->contains(fn ($participant) => $participant->user_id === auth()->id() && $participant->status === 'joined'); $isFull = $ridePost->max_participants && $joined >= $ridePost->max_participants; @endphp
{{ $ridePost->scheduled_for?->timezone($park->timezone)->format('H:i') }} {{ $ridePost->scheduled_for?->timezone($park->timezone)->format('d/m') }}
{{ __('ui.ride_together_open') }}

{{ $rideName }}

{{ __('ui.ride_together_by', ['name' => $ridePost->creator?->username ? '@'.$ridePost->creator->username : $ridePost->creator?->name]) }} @if($ridePost->meeting_point)

📍 {{ $ridePost->meeting_point }}

@endif @if($ridePost->note)

{{ $ridePost->note }}

@endif
{{ $joined }}{{ $ridePost->max_participants ? '/'.$ridePost->max_participants : '' }} {{ __('ui.ride_together_riders') }}
@auth @if($isMine) ✓ {{ __('ui.ride_together_yours') }}
@csrf @method('DELETE')
@elseif($iJoined) ✓ {{ __('ui.ride_together_you_joined') }}
@csrf @method('DELETE')
@elseif(!$isFull)
@csrf
@else {{ __('ui.ride_together_full_label') }} @endif @else {{ __('ui.auth_login') }} @endauth
@endforeach
@else
{{ __('ui.ride_together_empty') }}
@endif
{{ __('ui.park_discover') }}

{{ __('ui.park_about') }}

{{ $description ?: __('ui.park_no_description') }}

@if($park->website_url) {{ __('ui.park_website') }} ↗ @endif @if($park->opened_on) {{ __('ui.park_since') }} {{ $park->opened_on->format('Y') }} @endif
{{ __('ui.park_map_kicker') }}

{{ __('ui.park_map_title') }}

{{ __('ui.park_map_text_v144') }}

{{ __('ui.park_map_open_full') }}
@if($lat !== null && $lng !== null)
{{ __('ui.park_map_coordinates') }} {{ number_format((float) $lat, 4) }} · {{ number_format((float) $lng, 4) }}
@endif
@php $experienceCount = $park->attractions->count(); @endphp
{{ __('ui.park_experiences_kicker') }}

{{ __('ui.park_catalogue') }}

{{ __('ui.park_catalogue_text') }}

{{ __('ui.park_experience_count', ['count' => $experienceCount]) }}
{{ $hasLive ? __('ui.live_connected') : __('ui.live_waiting') }} {{ __('ui.live_quasi_realtime') }}
@if($park->attractions->isNotEmpty()) @if($coasters->isNotEmpty())
{{ __('ui.type_coaster') }}

{{ __('ui.park_coasters') }}

{{ $coasters->count() }}
@foreach($coasters as $attraction) @include('pages.partials.park-experience-card', ['attraction' => $attraction]) @endforeach
@endif @if($otherAttractions->isNotEmpty())
{{ __('ui.type_attraction') }}

{{ __('ui.park_attractions') }}

{{ $otherAttractions->count() }}
@foreach($otherAttractions as $attraction) @include('pages.partials.park-experience-card', ['attraction' => $attraction]) @endforeach
@endif @else

{{ __('ui.park_catalogue_empty_title') }}

{{ __('ui.park_catalogue_empty_text') }}

@endif
@if($gallery->isNotEmpty()) @endif @include('pages.partials.local-experts-park', ['localExperts' => $localExperts, 'park' => $park]) @include('pages.partials.community-reviews', ['community' => $community]) @endsection @push('scripts') @endpush