columns(2) ->components([ TextInput::make('name') ->label('Name') ->required() ->maxLength(255), TextInput::make('email') ->label('E-Mail (Anmeldename)') ->email() ->required() ->unique(ignoreRecord: true) ->maxLength(255), Radio::make('role') ->label('Rolle') ->options(UserRole::class) ->required() ->columnSpanFull(), TextInput::make('password') ->label(fn (string $operation): string => $operation === 'create' ? 'Passwort' : 'Neues Passwort (leer lassen = unverändert)') ->password() ->revealable() ->minLength(10) ->required(fn (string $operation): bool => $operation === 'create') ->dehydrated(fn (?string $state): bool => filled($state)), ]); } }