<?php

namespace Modules\Catalog\Filament\Resources\DepartureTimeSlots;

use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use Modules\Catalog\Filament\Resources\DepartureTimeSlots\Pages\CreateDepartureTimeSlot;
use Modules\Catalog\Filament\Resources\DepartureTimeSlots\Pages\EditDepartureTimeSlot;
use Modules\Catalog\Filament\Resources\DepartureTimeSlots\Pages\ListDepartureTimeSlots;
use Modules\Catalog\Filament\Resources\DepartureTimeSlots\Schemas\DepartureTimeSlotForm;
use Modules\Catalog\Filament\Resources\DepartureTimeSlots\Tables\DepartureTimeSlotsTable;
use Modules\Catalog\Models\DepartureTimeSlot;
use UnitEnum;

class DepartureTimeSlotResource extends Resource
{
    protected static ?string $model = DepartureTimeSlot::class;

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

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

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

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

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

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