<?php

namespace App\Filament\Resources\TextbookCatalogResource\Pages;

use App\Filament\Resources\TextbookCatalogResource;
use Filament\Resources\Pages\ManageRecords;
use Filament\Actions\Action;

class ManageTextbookCatalogs extends ManageRecords
{
    protected static string $resource = TextbookCatalogResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Action::make('import_excel')
                ->label('Excel导入')
                ->icon('heroicon-o-document-arrow-up')
                ->color('success')
                ->url(fn(): string =>
                    route('filament.admin.pages.textbook-excel-import-page') . '?type=textbook_catalog'
                ),
        ];
    }

}
