<?php

namespace Modules\Catalog\Filament\Resources\EvCompanies;

use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use Modules\Catalog\Filament\Resources\EvCompanies\Pages\CreateEvCompany;
use Modules\Catalog\Filament\Resources\EvCompanies\Pages\EditEvCompany;
use Modules\Catalog\Filament\Resources\EvCompanies\Pages\ListEvCompanies;
use Modules\Catalog\Filament\Resources\EvCompanies\Schemas\EvCompanyForm;
use Modules\Catalog\Filament\Resources\EvCompanies\Tables\EvCompaniesTable;
use Modules\Catalog\Models\EvCompany;
use UnitEnum;

class EvCompanyResource extends Resource
{
    protected static ?string $model = EvCompany::class;

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

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

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

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

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

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