<?php

namespace App\Filament\Resources\EtabAxes\Schemas;

use Filament\Schemas\Schema;
use Filament\Forms\Components\Select;
use App\Models\Axe;
use App\Models\Etablissement;

class EtabAxeForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Select::make('axe_id')
                    ->label('Axe')
                    ->options(Axe::all()->pluck('libelle', 'id'))
                    ->searchable()
                    ->required(),
                
                Select::make('etablissement_id')
                    ->label('Établissement')
                    ->options(Etablissement::all()->pluck('libellefr', 'id'))
                    ->searchable()
                    ->required(),
            ]);
    }
}
