<?php

namespace App\Filament\Clusters\Loans\Loans\Schemas;

use Filament\Forms\Components\Hidden;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;

class LoanForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Hidden::make('user_id')
                    ->default(user()->id),

                Hidden::make('passport_serie')
                    ->default(user()->getOption('passport_serie')),

                Hidden::make('passport_id')
                    ->default(user()->getOption('passport_id')),

                TextInput::make('account_number')
                    ->required()
                    ->string()
                    ->maxLength(23),
            ]);
    }
}
