<?php

declare(strict_types=1);

namespace App\Filament\Resources\MediaCategories;

use App\Filament\Resources\MediaCategories\Pages\CreateMediaCategory;
use App\Filament\Resources\MediaCategories\Pages\EditMediaCategory;
use App\Filament\Resources\MediaCategories\Pages\ListMediaCategories;
use App\Filament\Resources\MediaCategories\Schemas\MediaCategoryForm;
use App\Filament\Resources\MediaCategories\Tables\MediaCategoriesTable;
use App\Models\MediaCategory;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use UnitEnum;

class MediaCategoryResource extends Resource
{
    protected static ?string $model = MediaCategory::class;

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

    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 MediaCategoryForm::configure($schema);
    }

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

    public static function getPages(): array
    {
        return [
            'index' => ListMediaCategories::route('/'),
            'create' => CreateMediaCategory::route('/create'),
            'edit' => EditMediaCategory::route('/{record}/edit'),
        ];
    }
}
