<x-filament::page>
    <style>
        .command-bar {
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
        }
        .ui-tag {
            background: #f1f5f9;
            color: #475569;
            padding: 2px 8px;
            border-radius: 6px;
            font-size: 0.75rem;
            border: 1px solid #e2e8f0;
        }
        .custom-scroll::-webkit-scrollbar {
            width: 4px;
        }
        .custom-scroll::-webkit-scrollbar-track {
            background: transparent;
        }
        .custom-scroll::-webkit-scrollbar-thumb {
            background: #e2e8f0;
            border-radius: 10px;
        }
        .custom-scroll::-webkit-scrollbar-thumb:hover {
            background: #cbd5e1;
        }
        .btn-hover-zoom {
            transition: transform 0.2s;
        }
        .btn-hover-zoom:hover {
            transform: scale(1.02);
        }
    </style>

    <div class="space-y-4">
        @if(!$this->importRecord())
            <x-filament::section>
                @include('filament.partials.empty-state', [
                    'title' => '未选择导入记录',
                    'description' => '请先从 Markdown 导入列表进入工作台。',
                    'action' => new \Illuminate\Support\HtmlString('<a class="btn btn-primary btn-sm" href="' . route('filament.admin.resources.markdown-imports.index') . '">返回导入列表</a>'),
                ])
            </x-filament::section>
        @elseif(!$this->filenameValid)
            <x-filament::section>
                <div class="rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800">
                    <div class="flex items-center gap-2 font-bold mb-1">
                        <x-heroicon-o-exclamation-triangle class="w-5 h-5" />
                        文件名解析失败
                    </div>
                    {{ $this->filenameWarning }}
                </div>
                <div class="mt-3 text-sm text-slate-600">
                    请在导入列表中修改文件名并重新导入后再进入工作台。
                </div>
            </x-filament::section>
        @else
        
        {{-- 顶部高级指令中心 --}}
        <div class="sticky top-0 z-20 -mx-4 px-4 py-3 mb-6 command-bar rounded-xl flex items-center justify-between gap-4">
            <div class="flex items-center gap-4 flex-1">
                <x-filament::input.wrapper class="w-72">
                    <x-filament::input 
                        wire:model.debounce.400ms="search" 
                        placeholder="搜索卷子标题/编码..." 
                        prefix-icon="heroicon-m-magnifying-glass"
                    />
                </x-filament::input.wrapper>
                
                <div class="h-6 w-px bg-slate-200"></div>

                <div class="flex items-center gap-2">
                    <x-filament::button 
                        color="gray" 
                        icon="heroicon-o-sparkles" 
                        wire:click="autoInfer"
                        tooltip="基于文件名和内容智能推断缺失信息"
                        class="btn-hover-zoom"
                    >
                        自动推断
                    </x-filament::button>
                    
                    <x-filament::button 
                        color="gray" 
                        icon="heroicon-o-document-duplicate" 
                        wire:click="autoInferSelected"
                        tooltip="对勾选卷子执行智能推断"
                        class="btn-hover-zoom"
                    >
                        批量推断
                    </x-filament::button>
                </div>
            </div>

            <div class="flex items-center gap-3">
                <x-filament::button 
                    color="warning" 
                    icon="heroicon-o-squares-plus" 
                    wire:click="mergeSelectedPapers"
                    class="btn-hover-zoom"
                >
                    合并选定卷子
                </x-filament::button>

                <x-filament::button 
                    color="primary" 
                    icon="heroicon-o-check-circle" 
                    wire:click="savePaper"
                    size="lg"
                    class="btn-hover-zoom shadow-sm"
                >
                    保存当前设置
                </x-filament::button>
            </div>
        </div>

        <div class="grid grid-cols-12 gap-6 items-start">
            {{-- 左侧：资产与资源 --}}
            <div class="col-span-12 lg:col-span-8 space-y-6">
                {{-- 导入背景卡 --}}
                <div class="bg-white rounded-xl shadow-sm border border-slate-200 overflow-hidden">
                    <div class="px-4 py-3 border-b border-slate-100 bg-slate-50/50 flex items-center justify-between">
                        <h3 class="font-bold text-slate-800 flex items-center gap-2">
                            <x-heroicon-o-cloud-arrow-down class="w-4 h-4 text-primary-500" />
                            导入源信息
                        </h3>
                        <span class="text-xs font-mono text-slate-400">ID: #{{ $this->importId }}</span>
                    </div>
                    <div class="p-4">
                        <div class="grid grid-cols-3 gap-6">
                            <div class="space-y-1">
                                <div class="text-[10px] uppercase tracking-wider font-bold text-slate-400">原始文件</div>
                                <div class="text-sm font-medium text-slate-700 truncate" title="{{ $this->importRecord()?->file_name }}">
                                    {{ $this->importRecord()?->file_name ?? '-' }}
                                </div>
                            </div>
                            <div class="space-y-1">
                                <div class="text-[10px] uppercase tracking-wider font-bold text-slate-400">当前状态</div>
                                <div>
                                    <x-filament::badge color="info" icon="heroicon-m-arrow-path">
                                        {{ $this->importRecord()?->status_label ?? '未知' }}
                                    </x-filament::badge>
                                </div>
                            </div>
                            <div class="space-y-1 text-right">
                                <div class="text-[10px] uppercase tracking-wider font-bold text-slate-400">总候选题</div>
                                <div class="text-xl font-black text-primary-600">{{ $this->importRecord()?->parsed_count ?? 0 }}</div>
                            </div>
                        </div>
                        
                        @if(!empty($this->filenameParsed))
                            <div class="mt-4 pt-4 border-t border-slate-50 flex flex-wrap gap-2 text-xs text-slate-500">
                                <span class="ui-tag">系列：{{ $this->filenameParsed['series'] ?? '-' }}</span>
                                <span class="ui-tag">年级：{{ $this->filenameParsed['grade'] ?? '-' }}</span>
                                <span class="ui-tag">学期：{{ $this->filenameParsed['term'] ?? '-' }}</span>
                                <span class="ui-tag">学科：{{ $this->filenameParsed['subject'] ?? '-' }}</span>
                                <span class="ui-tag">名称：{{ $this->filenameParsed['name'] ?? '-' }}</span>
                            </div>
                        @endif
                    </div>
                </div>

                {{-- 卷子切分列表 --}}
                <x-filament::section>
                    <x-slot name="heading">
                        <div class="flex items-center gap-2">
                            <x-heroicon-o-list-bullet class="w-5 h-5 text-warning-500" />
                            待核对卷子列表
                        </div>
                    </x-slot>
                    <x-slot name="headerEnd">
                        <div class="flex items-center gap-2">
                            <x-filament::link wire:click="selectAllVisible" class="text-xs cursor-pointer">全选当前</x-filament::link>
                            <span class="text-slate-200">|</span>
                            <x-filament::link wire:click="clearSelection" color="danger" class="text-xs cursor-pointer">清空选择</x-filament::link>
                        </div>
                    </x-slot>

                    <div class="overflow-y-auto custom-scroll pr-2 divide-y divide-slate-50 last:border-b-0" style="height: 500px;">
                        @foreach($this->groupedPapers() as $group => $items)
                            <div class="sticky top-0 z-10 px-3 py-1.5 text-[10px] font-black uppercase tracking-widest text-slate-400 bg-white/95 backdrop-blur shadow-sm my-2 rounded-md">
                                {{ $group }}
                            </div>
                            @foreach($items as $paper)
                                @php
                                    $meta = $paper['meta'] ?? [];
                                    $expected = $meta['expected_count'] ?? null;
                                    $candidateCount = $paper['candidates_count'] ?? 0;
                                    $isSelected = ((int)$this->selectedPaperId === (int)$paper['id']);
                                    $catalogTitles = $this->catalogTitlesForPaper($paper);
                                @endphp
                                <div @class([
                                    'group flex items-start gap-3 p-3 transition-all rounded-xl border border-transparent',
                                    'bg-primary-50/40 border-primary-100 shadow-sm' => $isSelected,
                                    'hover:bg-slate-50/80 hover:border-slate-100' => !$isSelected,
                                ])>
                                    <input type="checkbox" wire:model="selectedIds" wire:click="selectPaper({{ $paper['id'] }})" value="{{ $paper['id'] }}" class="mt-1.5 rounded border-slate-300 text-primary-600 focus:ring-primary-500">
                                    
                                    <button type="button" wire:click="selectPaper({{ $paper['id'] }})" class="text-left flex-1 min-w-0">
                                        <div class="flex items-center justify-between gap-2 mb-1">
                                            <span @class([
                                                'text-sm font-bold truncate transition-colors',
                                                'text-primary-700' => $isSelected,
                                                'text-slate-800' => !$isSelected,
                                            ])>
                                                {{ $paper['title'] ?? $paper['full_title'] ?? '未命名卷子' }}
                                            </span>
                                            @if($isSelected)
                                                <span class="inline-flex h-2 w-2 rounded-full bg-primary-500 animate-pulse"></span>
                                            @endif
                                        </div>
                                        
                                        <div class="flex flex-wrap items-center gap-3 text-[11px]">
                                            <div class="flex items-center gap-1 text-slate-500 font-medium">
                                                <x-heroicon-m-academic-cap class="w-3.5 h-3.5" />
                                                {{ $paper['grade'] ?? '-' }}年级 / {{ $paper['term'] ?? '-' }}
                                            </div>
                                            
                                            <div @class([
                                                'px-2 py-0.5 rounded-full font-bold border',
                                                'bg-emerald-50 text-emerald-700 border-emerald-100' => $candidateCount > 0,
                                                'bg-slate-50 text-slate-400 border-slate-100' => $candidateCount === 0,
                                            ])>
                                                题量: {{ $candidateCount }}
                                                @if($expected)
                                                    <span class="text-[9px] opacity-70 ml-1"> (预期 {{ $expected }})</span>
                                                @endif
                                            </div>

                                            @if(empty($paper['textbook_id']))
                                                <span class="text-rose-500 font-bold flex items-center gap-0.5">
                                                    <x-heroicon-m-x-circle class="w-3.5 h-3.5" /> 缺教材
                                                </span>
                                            @endif
                                            @if(empty($catalogTitles))
                                                <span class="text-rose-500 font-bold flex items-center gap-0.5">
                                                    <x-heroicon-m-x-circle class="w-3.5 h-3.5" /> 缺目录
                                                </span>
                                            @endif
                                        </div>

                                        @if(!empty($catalogTitles))
                                            <div class="mt-1 text-[11px] text-slate-500 font-medium">
                                                目录：{{ implode(' · ', array_slice($catalogTitles, 0, 3)) }}@if(count($catalogTitles) > 3)…@endif
                                            </div>
                                        @endif
                                    </button>
                                </div>
                            @endforeach
                        @endforeach
                    </div>
                </x-filament::section>

                {{-- 内容预览 --}}
                <div class="bg-white rounded-xl shadow-md border border-slate-200 overflow-hidden">
                    <div class="px-4 py-3 border-b border-slate-100 bg-slate-50/50 flex items-center justify-between">
                        <div class="flex items-center gap-2">
                            <span class="text-xs font-black text-slate-500 uppercase tracking-widest">卷子内容预览</span>
                            @if($this->selectedPaper())
                                <x-filament::badge size="xs" color="gray" class="bg-slate-200/50 text-slate-600 font-medium border-slate-300">{{ $this->selectedPaper()?->title }}</x-filament::badge>
                            @endif
                        </div>
                    </div>
                    <div class="p-8 custom-scroll overflow-y-auto bg-slate-50/30" style="height: 600px;">
                        @if($this->selectedPaper())
                            <div class="prose prose-slate max-w-none transition-all duration-300">
                                <div class="markdown-body !bg-transparent p-0">
                                    {!! \App\Services\MathFormulaProcessor::processFormulas($this->selectedPaper()?->raw_markdown ?? '') !!}
                                </div>
                            </div>
                        @else
                            <div class="h-full flex flex-col items-center justify-center text-slate-400 gap-4 py-20">
                                <x-heroicon-o-document-magnifying-glass class="w-16 h-16 opacity-30" />
                                <div class="text-sm font-medium">点击左侧列表查看原始文本内容</div>
                            </div>
                        @endif
                    </div>
                </div>
            </div>

            {{-- 右侧：配置与控制 --}}
            <div class="col-span-12 lg:col-span-4 space-y-6">
                {{-- 1. 归属定义卡片 --}}
                <x-filament::section>
                    <x-slot name="heading">
                        <div class="flex items-center gap-2">
                            <x-heroicon-o-identification class="w-4 h-4 text-primary-500" />
                            归属定义
                        </div>
                    </x-slot>

                    <div class="space-y-4">
                        <div class="space-y-1">
                            <label class="text-[10px] font-black text-slate-400 uppercase tracking-widest">基础标题</label>
                            <x-filament::input.wrapper>
                                <x-filament::input wire:model="form.title" placeholder="例如：期中模拟卷 A" class="font-bold text-slate-800" />
                            </x-filament::input.wrapper>
                        </div>

                        <div class="p-3 bg-slate-50/50 rounded-xl border border-slate-100 space-y-3">
                            <div class="space-y-1">
                                <label class="text-[10px] font-black text-slate-400 uppercase tracking-widest">教材系列</label>
                                <x-filament::input.wrapper>
                                    <x-filament::input.select wire:model.live="form.textbook_series_id" class="font-medium">
                                        <option value="">[ 未选中系列 ]</option>
                                        @foreach($this->seriesOptions() as $id => $label)
                                            <option value="{{ $id }}">{{ $label }}</option>
                                        @endforeach
                                    </x-filament::input.select>
                                </x-filament::input.wrapper>
                            </div>

                            <div class="grid grid-cols-2 gap-3">
                                <div class="space-y-1">
                                    <label class="text-[10px] font-black text-slate-400 uppercase tracking-widest">年级</label>
                                    <x-filament::input.wrapper>
                                        <x-filament::input.select wire:model.live="form.grade">
                                            <option value="">选择年级</option>
                                            @foreach($this->gradeOptions() as $value => $label)
                                                <option value="{{ $value }}">{{ $label }}</option>
                                            @endforeach
                                        </x-filament::input.select>
                                    </x-filament::input.wrapper>
                                </div>
                                <div class="space-y-1">
                                    <label class="text-[10px] font-black text-slate-400 uppercase tracking-widest">学期</label>
                                    <x-filament::input.wrapper>
                                        <x-filament::input.select wire:model.live="form.term">
                                            <option value="">选择学期</option>
                                            @foreach($this->termOptions() as $value => $label)
                                                <option value="{{ $value }}">{{ $label }}</option>
                                            @endforeach
                                        </x-filament::input.select>
                                    </x-filament::input.wrapper>
                                </div>
                            </div>

                            <div class="space-y-1 pt-1">
                                <div class="flex items-center justify-between">
                                    <label class="text-[10px] font-black text-primary-500 uppercase tracking-widest">目标教材关联</label>
                                    <div wire:loading wire:target="form.grade, form.term, form.textbook_series_id, form.textbook_id" class="text-[9px] text-primary-500 animate-pulse font-bold">同步中...</div>
                                </div>
                                <x-filament::input.wrapper wire:key="textbook-select-parent-{{ $this->form['textbook_series_id'] ?? 'none' }}">
                                    <x-filament::input.select wire:model.live="form.textbook_id" @class([
                                        'font-black',
                                        'text-primary-600' => !empty($this->form['textbook_id']),
                                        'text-rose-500 underline decoration-dotted' => empty($this->form['textbook_id']),
                                    ])>
                                        <option value="">[ 自动寻找最匹配教材 ]</option>
                                        @foreach($this->textbookOptions() as $id => $title)
                                            <option value="{{ $id }}">{{ $title }}</option>
                                        @endforeach
                                    </x-filament::input.select>
                                </x-filament::input.wrapper>
                            </div>
                        </div>
                    </div>
                </x-filament::section>

                {{-- 2. 章节目录卡片 (关键：修复点击保存不生效的逻辑引导) --}}
                <x-filament::section collapsible>
                    <x-slot name="heading">
                        <div class="flex items-center gap-2">
                            <x-heroicon-o-list-bullet class="w-4 h-4 text-warning-500" />
                            关联目录章节
                        </div>
                    </x-slot>
                    
                    <div class="space-y-4">
                        <div wire:key="catalog-list-{{ $this->form['textbook_id'] ?? 'none' }}" class="overflow-y-auto border border-slate-200 rounded-xl p-2 bg-slate-50/30 divide-y divide-slate-100 custom-scroll" style="max-height: 400px;">
                            @forelse($this->catalogOptions() as $id => $label)
                                <label class="flex items-center gap-3 py-2 px-3 hover:bg-white transition-all cursor-pointer group rounded-lg">
                                    <input type="checkbox" wire:model.defer="form.catalog_node_ids" value="{{ $id }}" class="rounded-sm border-slate-300 text-primary-600 focus:ring-primary-500">
                                    <span class="text-[11px] font-bold text-slate-700 group-hover:text-primary-700">{{ $label }}</span>
                                </label>
                            @empty
                                <div class="py-12 text-center text-slate-400">
                                    <x-heroicon-m-document-magnifying-glass class="w-10 h-10 mx-auto mb-3 opacity-20" />
                                    <p class="text-[11px] italic font-medium">请先指定教材以加载章节路径</p>
                                </div>
                            @endforelse
                        </div>
                        
                        @if(!empty($this->form['catalog_node_ids']))
                            <div class="text-[10px] text-slate-400 italic flex items-center gap-1 px-1">
                                <x-heroicon-m-check-circle class="w-3 h-3 text-emerald-500" />
                                已选择 {{ count($this->form['catalog_node_ids']) }} 个节点
                            </div>
                        @endif
                    </div>
                </x-filament::section>

                {{-- 3. 补充元数据 (默认折叠，减少干扰) --}}
                <x-filament::section collapsible collapsed>
                    <x-slot name="heading">
                        <div class="flex items-center gap-2">
                            <x-heroicon-o-plus-circle class="w-4 h-4 text-slate-400" />
                            补充元数据
                        </div>
                    </x-slot>

                    <div class="space-y-3 mt-1">
                        <div class="grid grid-cols-2 gap-3">
                            <div class="space-y-1">
                                <label class="text-[10px] font-bold text-slate-500">预期题数</label>
                                <x-filament::input.wrapper>
                                    <x-filament::input wire:model="form.expected_count" placeholder="例如: 25" />
                                </x-filament::input.wrapper>
                            </div>
                            <div class="space-y-1">
                                <label class="text-[10px] font-bold text-slate-500">发布年份</label>
                                <x-filament::input.wrapper>
                                    <x-filament::input wire:model="form.source_year" placeholder="例如: 2024" />
                                </x-filament::input.wrapper>
                            </div>
                        </div>
                        
                        <div class="space-y-1">
                            <label class="text-[10px] font-bold text-slate-500">来源名称</label>
                            <x-filament::input.wrapper>
                                <x-filament::input wire:model="form.source_name" placeholder="来源名称 (例: 课课练)" />
                            </x-filament::input.wrapper>
                        </div>

                        <div class="grid grid-cols-2 gap-3">
                            <div class="space-y-1">
                                <label class="text-[10px] font-bold text-slate-500">页码范围</label>
                                <x-filament::input.wrapper>
                                    <x-filament::input wire:model="form.source_page" placeholder="例如: 1-4" />
                                </x-filament::input.wrapper>
                            </div>
                            <div class="space-y-1">
                                <label class="text-[10px] font-bold text-slate-500">通用标签</label>
                                <x-filament::input.wrapper>
                                    <x-filament::input wire:model="form.tags" placeholder="标签(逗号隔开)" />
                                </x-filament::input.wrapper>
                            </div>
                        </div>

                        <div class="bg-amber-50 rounded-xl p-3 border border-amber-100 shadow-sm">
                            <div class="text-[10px] font-black text-amber-600 uppercase tracking-widest mb-1.5 flex items-center gap-1.5">
                                <x-heroicon-m-sparkles class="w-3.5 h-3.5" />
                                智能预检测系统
                            </div>
                            <div class="text-[11px] text-amber-800 leading-relaxed font-medium space-y-1">
                                <div>推断类型：<span class="font-bold underline decoration-amber-300">{{ $this->form['source_type'] ?? '未识别类型' }}</span></div>
                                <div>推断章节：<span class="font-bold underline decoration-amber-300">{{ $this->form['chapter'] ?? '未识别章节' }}</span></div>
                            </div>
                        </div>
                    </div>
                </x-filament::section>

                {{-- 批量操作区 (极致紧凑设计) --}}
                <div class="bg-slate-900 rounded-2xl p-5 space-y-4 shadow-xl border-t-2 border-primary-500">
                    <div class="flex items-center justify-between gap-2 mb-2">
                        <div class="flex items-center gap-2">
                            <x-heroicon-o-bolt class="w-4 h-4 text-warning-400" />
                            <span class="text-xs font-black text-white uppercase tracking-widest">批量高效工具柜</span>
                        </div>
                        <x-filament::badge color="warning" size="xs">{{ count($this->selectedIds) }} 卷选中</x-filament::badge>
                    </div>
                    
                    <div class="space-y-2">
                        <x-filament::input.select wire:model.live="batch.textbook_series_id" size="sm" class="bg-slate-800 border-none text-white text-[11px]">
                            <option value="">批量系列...</option>
                            @foreach($this->seriesOptions() as $id => $name)
                                <option value="{{ $id }}">{{ $name }}</option>
                            @endforeach
                        </x-filament::input.select>

                        <x-filament::input.select wire:model="batch.textbook_id" size="sm" class="bg-slate-800 border-none text-white text-[11px]" wire:key="batch-textbook-{{ $this->batch['textbook_series_id'] ?? 'none' }}">
                            <option value="">批量教材...</option>
                            @foreach($this->textbookOptions($this->batch['textbook_series_id'] ?? null) as $id => $label)
                                <option value="{{ $id }}">{{ $label }}</option>
                            @endforeach
                        </x-filament::input.select>
                    </div>

                    <div class="grid grid-cols-2 gap-2">
                        <x-filament::input.select wire:model="batch.grade" size="sm" class="bg-slate-800 border-none text-white text-[11px]">
                            <option value="">年级...</option>
                            @foreach($this->gradeOptions() as $value => $label)
                                <option value="{{ $value }}">{{ $label }}</option>
                            @endforeach
                        </x-filament::input.select>
                        <x-filament::input.select wire:model="batch.term" size="sm" class="bg-slate-800 border-none text-white text-[11px]">
                            <option value="">学期...</option>
                            @foreach($this->termOptions() as $value => $label)
                                <option value="{{ $value }}">{{ $label }}</option>
                            @endforeach
                        </x-filament::input.select>
                    </div>

                    <div class="space-y-1 pt-1">
                        <label class="text-[10px] font-black text-slate-400 uppercase tracking-widest px-1">关联目录批量</label>
                        <div wire:key="batch-catalog-{{ $this->batch['textbook_id'] ?? 'none' }}" class="overflow-y-auto border border-slate-700/50 rounded-xl p-2 bg-slate-800 divide-y divide-slate-700/30 custom-scroll" style="height: 150px;">
                            @forelse($this->catalogOptions($this->batch['textbook_id'] ?? null) as $id => $label)
                                <label class="flex items-center gap-2 py-1.5 px-2 hover:bg-slate-700 transition-colors cursor-pointer rounded-lg group">
                                    <input type="checkbox" wire:model.defer="batch.catalog_node_ids" value="{{ $id }}" class="rounded-sm border-slate-600 bg-slate-700 text-primary-500 focus:ring-primary-400">
                                    <span class="text-[10px] text-slate-300 group-hover:text-white font-medium">{{ $label }}</span>
                                </label>
                            @empty
                                <div class="text-[10px] text-slate-500 py-10 italic text-center">选择教材以加载目录</div>
                            @endforelse
                        </div>
                    </div>

                    <div class="grid grid-cols-2 gap-3 pt-2">
                        <x-filament::button 
                            color="gray" 
                            size="sm" 
                            icon="heroicon-m-arrow-left-on-rectangle" 
                            wire:click="seedBatchFromCurrent"
                            class="bg-slate-800 border-none hover:bg-slate-700 text-slate-300"
                        >
                            复制配置
                        </x-filament::button>

                        <x-filament::button 
                            color="warning" 
                            icon="heroicon-o-fire" 
                            size="sm"
                            class="shadow-orange-500/20 shadow-lg"
                            x-on:click.prevent="if(confirm('确认将批量设置覆盖到勾选的卷子吗？')) { $wire.applyBatch() }"
                        >
                            执行覆盖
                        </x-filament::button>
                    </div>
                </div>
            </div>
        </div>
        @endif
    </div>
</x-filament::page>
