public function getForms(): array { return [ 'form' => $this->form( $this->makeForm()->schema([ Grid::make([ 'default' => 1, 'sm' => 1, 'md' => 1, 'lg' => 4, 'xl' => 6, '2xl' => 6, ]) ->schema([ DateRangePicker::make('start_date') ->hiddenLabel() ->helperText('When?') ->placeholder('Choose date') ->extraAttributes([ 'helper-position' => 'above', 'class' => 'helper-above', ]) ->live(debounce: 500), // ->reactive(), TimePicker::make('start_time') ->hiddenLabel() ->placeholder('Choose Time') ->default('09:00') ->seconds(false) ->helperText('Start time?') ->extraAttributes([ 'helper-position' => 'above', 'class' => 'client-form-input helper-above', ]) // ->live(debounce: 500), ->reactive(), TextInput::make('number_of_students') ->hiddenLabel() ->numeric() ->default(1) ->minValue(1) ->placeholder('Number #of Students') ->helperText('How many?') ->extraAttributes([ 'helper-position' => 'above', 'class' => 'client-form-input helper-above', ]) ->reactive(), Select::make('instructor_id') ->hiddenLabel() ->options(function () { return \App\Models\User::whereHas('roles', function ($query) { $query->where('name', BaseRolesEnum::INSTRUCTOR->value); })->where('instructor_status', InstructorStatusEnum::APPROVED)->get()->mapWithKeys(function ($user) { return [$user->id => "{$user->forename} {$user->surname}"]; })->toArray(); }) ->searchable() ->placeholder('Choose instructor') ->helperText('Who?') ->extraAttributes([ 'helper-position' => 'above', 'class' => 'client-form-input helper-above', ]) ->reactive(), Actions::make([ Action::make('reset')->label('Reset Details') ->action(fn() => $this->reset('data')) ->extraAttributes(['class' => 'client__button client__button--secondary']), ]) ->fullWidth() // ->alignEnd() // ->verticallyAlignEnd() ->columnStart([ 'default' => null, 'sm' => null, 'md' => null, 'lg' => 4, 'xl' => 6, '2xl' => 6, ]), // ->columnSpan(1), ]), ])->statePath('data'), ), ]; }