<?php

namespace App\Filament\Resources\Master\Classifications;

use App\Filament\Resources\Master\Classifications\Pages\ManageClassifications;
use App\Filament\Resources\Master\Classifications\Schemas\ClassificationForm;
use App\Filament\Resources\Master\Classifications\Tables\ClassificationTable;
use App\Models\Classification;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class ClassificationResource extends Resource
{
    protected static ?string $model = Classification::class;

    protected static string|UnitEnum|null $navigationGroup = 'Master';

    protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedBookOpen;

    protected static ?string $navigationLabel = 'Klasifikasi';

    protected static ?int $navigationSort = 1;

    protected static ?string $slug = 'master/classifications';

    public static function form(Schema $schema): Schema
    {
        return ClassificationForm::configure($schema);
    }

    public static function table(Table $table): Table
    {
        return ClassificationTable::configure($table);
    }

    public static function getPages(): array
    {
        return [
            'index' => ManageClassifications::route('/'),
        ];
    }
}
