<?php

declare(strict_types=1);

namespace App\Filament\Resources\Ratings;

use App\Filament\Resources\Ratings\Pages\ListRatings;
use App\Models\Rating;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use UnitEnum;

class RatingResource extends Resource
{
    protected static ?string $model = Rating::class;

    protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-star';

    protected static ?string $navigationLabel = 'امتیازها';

    protected static ?string $modelLabel = 'امتیاز';

    protected static ?string $pluralModelLabel = 'امتیازها';

    protected static string|null|UnitEnum $navigationGroup = 'پشتیبانی';

    public static function form(Schema $schema): Schema
    {
        return \App\Filament\Resources\Ratings\Schemas\RatingForm::configure($schema);
    }

    public static function table(Table $table): Table
    {
        return \App\Filament\Resources\Ratings\Tables\RatingsTable::configure($table);
    }

    public static function getPages(): array
    {
        return [
            'index' => ListRatings::route('/'),
            'edit' => \App\Filament\Resources\Ratings\Pages\EditRating::route('/{record}/edit'),
        ];
    }
}
