@php use App\Support\EventsSourceLink; @endphp
<x-app-layout :title="'Link to Ladill Events · '.$room->title">
    <div class="mx-auto max-w-xl">
        <a href="{{ $room->isWebinar() ? route('meet.webinars.show', $room) : route('meet.conferences.show', $room) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">← Back</a>
        <h1 class="mt-4 text-xl font-semibold text-slate-900">Link to Ladill Events</h1>
        <p class="mt-1 text-sm text-slate-500">
            Choose a virtual or hybrid event. Registration, bulk invitations, speakers, and QR codes will be managed in Events.
        </p>

        @if ($errors->any())
            <div class="mt-4 rounded-lg border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-700">
                {{ $errors->first() }}
            </div>
        @endif

        <div class="mt-6 rounded-2xl border border-slate-200 bg-white p-6">
            @include('meet.partials.events-link-form', [
                'room' => $room,
                'events' => $events,
                'expectedType' => $expectedType,
            ])
        </div>
    </div>
</x-app-layout>
