<?php

namespace App\Filament\Resources\WatchedEvents;

use App\Filament\NavigationGroup;
use App\Filament\Resources\WatchedEvents\Pages\CreateWatchedEvent;
use App\Filament\Resources\WatchedEvents\Pages\EditWatchedEvent;
use App\Filament\Resources\WatchedEvents\Pages\ListWatchedEvents;
use App\Filament\Resources\WatchedEvents\Schemas\WatchedEventForm;
use App\Filament\Resources\WatchedEvents\Tables\WatchedEventsTable;
use App\Models\WatchedEvent;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class WatchedEventResource extends Resource
{
    protected static ?string $model = WatchedEvent::class;

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

    protected static string|\UnitEnum|null $navigationGroup = NavigationGroup::Forecasting;

    protected static ?string $navigationLabel = 'Watched Events';

    protected static ?int $navigationSort = 1;

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

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

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