<?php

namespace App\Filament\Resources\AccessRequests;

use App\Filament\Resources\AccessRequests\Pages\CreateAccessRequests;
use App\Filament\Resources\AccessRequests\Pages\EditAccessRequests;
use App\Filament\Resources\AccessRequests\Pages\ListAccessRequests;
use App\Filament\Resources\AccessRequests\Pages\ViewAccessRequests;
use App\Filament\Resources\AccessRequests\Schemas\AccessRequestsForm;
use App\Filament\Resources\AccessRequests\Schemas\AccessRequestsInfolist;
use App\Filament\Resources\AccessRequests\Tables\AccessRequestsTable;
use App\Models\AccessRequests;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class AccessRequestsResource extends Resource
{
    protected static ?string $model = AccessRequests::class;

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

    protected static ?string $recordTitleAttribute = 'game_username';

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

    public static function infolist(Schema $schema): Schema
    {
        return AccessRequestsInfolist::configure($schema);
    }

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListAccessRequests::route('/'),
            'create' => CreateAccessRequests::route('/create'),
            'view' => ViewAccessRequests::route('/{record}'),
            'edit' => EditAccessRequests::route('/{record}/edit'),
        ];
    }
}
