<?php

namespace App\Filament\Admin\Resources\TopUps;

use App\Filament\Admin\Resources\TopUps\Pages\CreateTopUp;
use App\Filament\Admin\Resources\TopUps\Pages\EditTopUp;
use App\Filament\Admin\Resources\TopUps\Pages\ListTopUps;
use App\Filament\Admin\Resources\TopUps\Pages\ViewTopUp;
use App\Filament\Admin\Resources\TopUps\Schemas\TopUpForm;
use App\Filament\Admin\Resources\TopUps\Schemas\TopUpInfolist;
use App\Filament\Admin\Resources\TopUps\Tables\TopUpsTable;
use App\Models\TopUp;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class TopUpResource extends Resource
{
    protected static ?string $model = TopUp::class;

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

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

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

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListTopUps::route('/'),
            'create' => CreateTopUp::route('/create'),
            'view' => ViewTopUp::route('/{record}'),
            'edit' => EditTopUp::route('/{record}/edit'),
        ];
    }
}
