<?php

namespace App\Filament\Resources\PaymentFines;

use App\Filament\Resources\PaymentFines\Pages;
use App\Models\PaymentFine;
use App\Enums\NavigationGroup;
use Filament\Schemas\Schema;
use Filament\Resources\Resource;
use Filament\Tables\Table;
use App\Filament\Resources\PaymentFines\Schemas\PaymentFineForm;
use App\Filament\Resources\PaymentFines\Tables\PaymentFinesTable;

class PaymentFineResource extends Resource
{
    protected static array $permissionActions = ["view", "create", "update", "delete", "restore", "forceDelete"];
    protected static ?string $model = PaymentFine::class;
    protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-exclamation-triangle';
    protected static string | \UnitEnum | null $navigationGroup = NavigationGroup::FINANCE->value;
    protected static ?int $navigationSort = 6;

    protected static ?string $modelLabel = 'Tiền phạt';
    protected static ?string $pluralModelLabel = 'Tiền phạt';

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

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

    public static function getPages(): array
    {
        return [
            'index' => Pages\ListPaymentFines::route('/'),
            'create' => Pages\CreatePaymentFine::route('/create'),
            'edit' => Pages\EditPaymentFine::route('/{record}/edit'),
        ];
    }
}
