<?php

namespace App\Filament\Resources\Offers;

use App\Filament\Resources\Offers\Pages;
use App\Models\Offer;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;
use UnitEnum;

class OfferResource extends Resource
{
    protected static ?string $model = Offer::class;
    protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-gift';
    protected static UnitEnum|string|null $navigationGroup = 'Conversion Engine';

    public static function form(Schema $schema): Schema
    {
        return Schemas\OfferForm::configure($schema);
    }

    public static function table(Table $table): Table
    {
        return Tables\OffersTable::configure($table);
    }

    public static function getPages(): array
    {
        return [
            'index' => Pages\ListOffers::route('/'),
            'create' => Pages\CreateOffer::route('/create'),
            'edit' => Pages\EditOffer::route('/{record}/edit'),
        ];
    }
}
