<?php

namespace App\Filament\Admin\Resources\CreditCoupons;

use App\Filament\Admin\Resources\CreditCoupons\Pages\CreateCreditCoupon;
use App\Filament\Admin\Resources\CreditCoupons\Pages\EditCreditCoupon;
use App\Filament\Admin\Resources\CreditCoupons\Pages\ListCreditCoupons;
use App\Filament\Admin\Resources\CreditCoupons\Pages\ViewCreditCoupon;
use App\Filament\Admin\Resources\CreditCoupons\Schemas\CreditCouponForm;
use App\Filament\Admin\Resources\CreditCoupons\Schemas\CreditCouponInfolist;
use App\Filament\Admin\Resources\CreditCoupons\Tables\CreditCouponsTable;
use App\Models\CreditCoupon;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class CreditCouponResource extends Resource
{
    protected static ?string $model = CreditCoupon::class;

    protected static string|BackedEnum|null $navigationIcon = Heroicon::Bolt;
    protected static string|UnitEnum|null $navigationGroup = "Coupon & Credit Coupon";
    protected static ?int $navigationSort = 2;
    protected static ?string $recordTitleAttribute = 'CreditCoupon';

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

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

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListCreditCoupons::route('/'),
            'create' => CreateCreditCoupon::route('/create'),
            'view' => ViewCreditCoupon::route('/{record}'),
            'edit' => EditCreditCoupon::route('/{record}/edit'),
        ];
    }
}
