<?php

namespace App\Filament\Admin\Resources\Pages;

use App\Filament\Admin\Resources\Pages\Pages\CreatePages;
use App\Filament\Admin\Resources\Pages\Pages\EditPages;
use App\Filament\Admin\Resources\Pages\Pages\ListPages;
use App\Filament\Admin\Resources\Pages\Pages\ViewPages;
use App\Filament\Admin\Resources\Pages\Schemas\PagesForm;
use App\Filament\Admin\Resources\Pages\Schemas\PagesInfolist;
use App\Filament\Admin\Resources\Pages\Tables\PagesTable;
use App\Models\Pages;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class PagesResource extends Resource
{
    protected static ?string $model = Pages::class;

    protected static string|BackedEnum|null $navigationIcon = Heroicon::BookOpen;
    protected static string|UnitEnum|null $navigationGroup = "Manage Pages";
    protected static ?int $navigationSort = 1;
    protected static ?string $recordTitleAttribute = 'Pages';

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

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

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListPages::route('/'),
            'create' => CreatePages::route('/create'),
            'view' => ViewPages::route('/{record}'),
            'edit' => EditPages::route('/{record}/edit'),
        ];
    }
}
