<?php

namespace App\Filament\Resources\TextbookResource\Pages;
use Illuminate\Database\Eloquent\Builder;

use App\Filament\Resources\TextbookResource;
use Filament\Actions;
use Filament\Resources\Pages\ManageRecords;

class ManageTextbooks extends ManageRecords
{
    protected static string $resource = TextbookResource::class;

    protected function getHeaderActions(): array
    {
        return [
            Actions\CreateAction::make()
                ->label('新建教材'),
        ];
    }

    protected function mutateTableQueryUsing(Builder $query): Builder
    {
        // 由于数据在 PostgreSQL 中，这里返回空查询
        // 实际数据通过 API 获取
        return $query->whereRaw('1=0');
    }
}
