<x-filament-panels::page>
    <div class="space-y-6">
        {{-- 搜索表单 --}}
        <x-filament::card>
            <form wire:submit.prevent="search">
                {{ $this->form }}

                <div class="mt-6 flex gap-3">
                    <x-filament::button type="submit" icon="heroicon-o-magnifying-glass">
                        搜索
                    </x-filament::button>

                    <x-filament::button type="button" color="gray" wire:click="clearSearch">
                        清空
                    </x-filament::button>
                </div>
            </form>
        </x-filament::card>

        {{-- 搜索结果 --}}
        @if($hasSearched)
            <x-filament::card>
                <div class="space-y-4">
                    <h3 class="text-lg font-semibold">
                        搜索结果
                        @if($searchQuery)
                            <span class="text-sm font-normal text-gray-500">
                                - 关键词: "{{ $searchQuery }}"
                            </span>
                        @endif
                    </h3>

                    {{ $this->table }}
                </div>
            </x-filament::card>
        @endif
    </div>
</x-filament-panels::page>
