<?php

namespace App\Filament\Resources\Inspecteurs\Schemas;

use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;

class InspecteurForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('nomfr')
                    ->required(),
                TextInput::make('nomar')
                    ->required(),
                TextInput::make('matricule')
                    ->required(),
                TextInput::make('nni')
                    ->required(),
                DatePicker::make('date_naissance')
                    ->required(),
                TextInput::make('lieu_naissance_ar')
                    ->required(),
                TextInput::make('lieu_naissance_fr')
                    ->required(),
                DatePicker::make('date_affectation')
                    ->required(),
                TextInput::make('contact')
                    ->required(),
                DatePicker::make('date_mise_en_corps_IES')
                    ->required(),
                TextInput::make('bank')
                    ->required(),
                TextInput::make('compte')
                    ->required(),
                TextInput::make('email')
                    ->label('Email address')
                    ->email()
                    ->required(),
                TextInput::make('matrimonialite')
                    ->required(),
                DatePicker::make('date_recri_fp')
                    ->required(),
                TextInput::make('photo')
                    ->required(),
                Select::make('discipline_id')
                    ->relationship('discipline', 'libelle')
                    ->required(),
                Select::make('pole_id')
                    ->relationship('pole', 'libelle')
                    ->required(),
            ]);
    }
}
