<?php

namespace App\Filament\Resources\Master\Themes;

use App\Filament\Resources\Master\Themes\Pages\ManageThemes;
use App\Filament\Resources\Master\Themes\Schemas\ThemeForm;
use App\Filament\Resources\Master\Themes\Tables\ThemeTable;
use App\Models\Theme;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class ThemeResource extends Resource
{
    protected static ?string $model = Theme::class;

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

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

    protected static ?string $navigationLabel = 'Tema';

    protected static ?int $navigationSort = 7;

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

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

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

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