<?php

namespace App\Filament\Clusters\Cards\Resources\CardPinOrders;

use App\Filament\Clusters\Cards\CardsCluster;
use App\Filament\Clusters\Cards\Resources\CardPinOrders\Pages\CreateCardPinOrder;
use App\Filament\Clusters\Cards\Resources\CardPinOrders\Pages\EditCardPinOrder;
use App\Filament\Clusters\Cards\Resources\CardPinOrders\Pages\ListCardPinOrders;
use App\Filament\Clusters\Cards\Resources\CardPinOrders\Schemas\CardPinOrderForm;
use App\Filament\Clusters\Cards\Resources\CardPinOrders\Tables\CardPinOrdersTable;
use App\Modules\CardPinOrder\Models\CardPinOrder;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class CardPinOrderResource extends Resource
{
    protected static ?int $navigationSort = 3;

    protected static ?string $model = CardPinOrder::class;

    protected static ?string $cluster = CardsCluster::class;

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

    public static function getNavigationLabel(): string
    {
        return __('Forgot card pin');
    }

    public static function getModelLabel(): string
    {
        return __('Pin order');
    }

    public static function getPluralModelLabel(): string
    {
        return __('Pin orders');
    }

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

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

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

    public static function getPages(): array
    {
        return [
            'index' => ListCardPinOrders::route('/'),
            'create' => CreateCardPinOrder::route('/create'),
            'edit' => EditCardPinOrder::route('/{record}/edit'),
        ];
    }
}
