<?php

namespace App\Filament\Clusters\Settings\LoanOrderRequiredDocs;

use App\Filament\Clusters\Settings\LoanOrderRequiredDocs\Pages\ManageLoanOrderRequiredDocs;
use App\Filament\Clusters\Settings\LoanOrderRequiredDocs\Schemas\LoanOrderRequiredDocsForm;
use App\Filament\Clusters\Settings\LoanOrderRequiredDocs\Tables\LoanOrderRequiredDocsTable;
use App\Filament\Clusters\Settings\SettingsCluster;
use App\Modules\LoanOrder\Models\LoanOrderRequiredDocs;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class LoanOrderRequiredDocsResource extends Resource
{
    protected static ?string $model = LoanOrderRequiredDocs::class;

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

    protected static ?int $navigationSort = 2;

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

    protected static ?string $recordTitleAttribute = 'name';

    public static function getNavigationGroup(): ?string
    {
        return __('module.loan-order::loan-order.loans');
    }

    public static function getModelLabel(): string
    {
        return __('module.loan-order::loan-order.loan_order_required_docs');
    }

    public static function getPluralModelLabel(): string
    {
        return __('module.loan-order::loan-order.loan_order_required_docs');
    }

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

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

    public static function getPages(): array
    {
        return [
            'index' => ManageLoanOrderRequiredDocs::route('/'),
        ];
    }
}
