<?php

namespace App\Filament\Resources\Poles;

use App\Filament\Resources\Poles\Pages\CreatePole;
use App\Filament\Resources\Poles\Pages\EditPole;
use App\Filament\Resources\Poles\Pages\ListPoles;
use App\Filament\Resources\Poles\Schemas\PoleForm;
use App\Filament\Resources\Poles\Tables\PolesTable;
use App\Models\Pole;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class PoleResource extends Resource
{
    protected static ?string $model = Pole::class;

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

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

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

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

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