<?php

namespace App\Filament\Resources\StructurePedagogiques\Schemas;

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

class StructurePedagogiqueForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Select::make('niveau_id')
                    ->relationship('niveau', 'libelle')
                    ->required(),
                TextInput::make('nombre_section')
                    ->required()
                    ->numeric(),
                TextInput::make('nombre_eleves')
                    ->required()
                    ->numeric(),
                TextInput::make('nombre_filles')
                    ->required()
                    ->numeric(),
                Select::make('etablissement_id')
                    ->relationship('etablissement', 'libellefr')
                    ->required(),
                Select::make('annee_id')
                    ->relationship('annee', 'libelle')
                    ->required(),
            ]);
    }
}
