<?php

namespace App\Filament\Pages;

use App\Models\MarkdownImport;
use Filament\Pages\Page;

class QuestionImportWizard extends Page
{
    protected static ?string $navigationLabel = '补录流程向导';
    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-sparkles';
    protected static string|\UnitEnum|null $navigationGroup = '卷子导入流程';
    protected static ?int $navigationSort = 6;

    protected string $view = 'filament.pages.question-import-wizard';

    public ?int $importId = null;

    public function mount(): void
    {
        $this->importId = request()->integer('import_id');
    }

    public function importOptions(): array
    {
        return MarkdownImport::query()->orderByDesc('id')->pluck('file_name', 'id')->toArray();
    }
}
