<x-app-layout>
    <x-slot name="header">
        <div class="flex items-center justify-between">
            <h2 class="text-xl font-semibold leading-tight">
                {{ $event->exists ? __('Edit event details') : __('Create a new event') }}
            </h2>

            {{-- “Back” breadcrumb --}}
            <a href="{{ route('calendar.show', $calendar) }}"
               class="text-sm text-gray-500 hover:text-gray-700">
                ← {{ $calendar->name }}
            </a>
        </div>
    </x-slot>

    <div class="py-6">
        <div class="max-w-2xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white shadow-sm sm:rounded-lg p-6">
                @include('event.partials.form', compact('calendar', 'event', 'start', 'end', 'rrule'))
            </div>
        </div>
    </div>
</x-app-layout>
