<?php

namespace App\Filament\Resources\InterstitialAds;

use App\Filament\Resources\InterstitialAds\Pages\CreateInterstitialAd;
use App\Filament\Resources\InterstitialAds\Pages\EditInterstitialAd;
use App\Filament\Resources\InterstitialAds\Pages\ListInterstitialAds;
use App\Filament\Resources\InterstitialAds\Pages\ViewInterstitialAd;
use App\Filament\Resources\InterstitialAds\Schemas\InterstitialAdForm;
use App\Filament\Resources\InterstitialAds\Schemas\InterstitialAdInfolist;
use App\Filament\Resources\InterstitialAds\Tables\InterstitialAdsTable;
use App\Models\InterstitialAd;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class InterstitialAdResource extends Resource
{
    protected static ?string $model = InterstitialAd::class;

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

    protected static string|\UnitEnum|null $navigationGroup = 'Monetization';

    protected static ?int $navigationSort = 1;

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

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

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListInterstitialAds::route('/'),
            'create' => CreateInterstitialAd::route('/create'),
            'view' => ViewInterstitialAd::route('/{record}'),
            'edit' => EditInterstitialAd::route('/{record}/edit'),
        ];
    }
}
