<?php

namespace App\Filament\Resources\Rapports\Schemas;

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

class RapportForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                DatePicker::make('date_inspection')
                    ->required(),
                TextInput::make('classe_visitee')
                    ->required(),
                TextInput::make('nombre_eleve')
                    ->required()
                    ->numeric(),
                TextInput::make('present')
                    ->required()
                    ->numeric(),
                TextInput::make('horaire')
                    ->required(),
                TextInput::make('passation')
                    ->required(),
                TextInput::make('titre_lecon')
                    ->required(),
                TextInput::make('deroulement')
                    ->required(),
                TextInput::make('appreciation_generale')
                    ->required(),
                TextInput::make('numero_ordre')
                    ->required()
                    ->numeric(),
                TextInput::make('note')
                    ->required()
                    ->numeric(),
                Select::make('etablissement_id')
                    ->relationship('etablissement', 'id')
                    ->required(),
                Select::make('professeur_id')
                    ->relationship('professeur', 'id')
                    ->required(),
                Select::make('inspecteur_id')
                    ->relationship('inspecteur', 'id')
                    ->required(),
            ]);
    }
}
