@extends('frontend.layouts.registration') @section('title', $title) @section('description', $description) @section('content') @php $steps = [ 'details' => 'Event', 'form' => 'Register', 'done' => 'Done', ]; $step_keys = array_keys($steps); $current_index = (int) array_search($step, $step_keys, true); $completed_count = max(0, $current_index); $total_steps = count($steps); $progress_pct = (int) round(($completed_count / max(1, $total_steps - 1)) * 100); if ($step === 'done') { $progress_pct = 100; $completed_count = $total_steps; } $countdown_target = $event->start_date?->toIso8601String(); $social_links = collect($social_links ?? []); @endphp
@if($step !== 'details') @endif

{{ $completed_count }} of {{ $total_steps }} completed

@if(session('error'))
{{ session('error') }}
@endif @if(!$event->isRegistrationOpen() && $step !== 'done')

{{ $event->category?->name ?? 'Event registration' }}

{{ $event->title }}

@if($event->isFull()) This event is full. @elseif($event->registration_deadline && now() > $event->registration_deadline) Registration for this event has closed. @else Registration is not available for this event. @endif
@elseif($step === 'details') @include('frontend.events.partials.public-register-details') @elseif($step === 'form') @include('frontend.events.partials.public-register-form') @elseif($step === 'done') @include('frontend.events.partials.public-register-done') @endif
@endsection @push('scripts') @endpush