<x-filament-panels::page>
    <div class="space-y-6">
        {{ $this->form }}

        @if ($result)
            <div class="rounded-2xl border border-gray-200/80 bg-white/70 p-6 shadow-sm ring-1 ring-black/5 dark:border-white/10 dark:bg-white/5">
                <p class="text-xs uppercase tracking-[0.3em] text-gray-500 dark:text-gray-300">Upload Endpoint</p>
                <p class="mt-1 break-all font-semibold text-gray-900 dark:text-white">{{ $result['upload_url'] }}</p>

                <div class="mt-4 grid gap-4 md:grid-cols-2">
                    <div class="rounded-xl border border-gray-200 bg-white p-4 shadow-sm dark:border-white/10 dark:bg-white/5">
                        <p class="text-xs uppercase tracking-[0.3em] text-gray-500 dark:text-gray-300">Upload Token</p>
                        <p class="mt-1 break-all font-mono text-sm text-gray-900 dark:text-white">{{ $result['upload_token'] }}</p>
                        <p class="mt-2 text-xs text-gray-500 dark:text-gray-300">Trage diesen Token in Sparkbooth unter „Upload Secret“ ein.</p>
                    </div>
                    <div class="rounded-xl border border-gray-200 bg-white p-4 shadow-sm dark:border-white/10 dark:bg-white/5">
                        <p class="text-xs uppercase tracking-[0.3em] text-gray-500 dark:text-gray-300">Galerie-Link</p>
                        <p class="mt-1 break-all font-semibold text-gray-900 dark:text-white">{{ $result['gallery_url'] }}</p>
                        <p class="mt-2 text-xs text-gray-500 dark:text-gray-300">Slug: {{ $result['gallery']['slug'] }}, Pfad: storage/{{ $result['gallery']['images_path'] }}</p>
                    </div>
                </div>

                <div class="mt-6 grid gap-4 md:grid-cols-2">
                    <div class="rounded-xl border border-gray-200 bg-white p-4 shadow-sm dark:border-white/10 dark:bg-white/5">
                        <p class="text-xs uppercase tracking-[0.3em] text-gray-500 dark:text-gray-300">QR Code (Galerie)</p>
                        <div class="mt-2 rounded-lg border border-gray-200 bg-white p-2 shadow-sm dark:border-white/20 dark:bg-white/5">
                            {!! \SimpleSoftwareIO\QrCode\Facades\QrCode::size(200)->margin(1)->generate($result['gallery_url']) !!}
                        </div>
                    </div>
                    <div class="rounded-xl border border-gray-200 bg-white p-4 shadow-sm dark:border-white/10 dark:bg-white/5">
                        <p class="text-xs uppercase tracking-[0.3em] text-gray-500 dark:text-gray-300">QR Code (Upload)</p>
                        <div class="mt-2 rounded-lg border border-gray-200 bg-white p-2 shadow-sm dark:border-white/20 dark:bg-white/5">
                            {!! \SimpleSoftwareIO\QrCode\Facades\QrCode::size(200)->margin(1)->generate($result['upload_url'].'?token='.$result['upload_token']) !!}
                        </div>
                    </div>
                </div>

                <div class="mt-6">
                    <p class="text-xs uppercase tracking-[0.3em] text-gray-500 dark:text-gray-300">Sparkbooth Beispiel (Custom Upload)</p>
<pre class="mt-2 rounded-xl border border-gray-200 bg-gray-900 p-4 text-xs text-gray-100 dark:border-white/10">
POST {{ $result['upload_url'] }}
Content-Type: multipart/form-data
token={{ $result['upload_token'] }}
file=@your-photo.jpg
</pre>
                </div>
            </div>
        @endif
    </div>
</x-filament-panels::page>
