schema([ KeyValue::make('name')->label('Name (de/en)')->keyLabel('locale')->valueLabel('value')->default(['de' => '', 'en' => ''])->required(), TextInput::make('icon')->label('Icon/Emoji')->maxLength(50), TextInput::make('color')->maxLength(7)->helperText('#RRGGBB'), KeyValue::make('description')->label('Description (de/en)')->keyLabel('locale')->valueLabel('value'), TextInput::make('sort_order')->numeric()->default(0), Toggle::make('is_active')->default(true), Select::make('eventTypes') ->label('Event Types') ->multiple() ->searchable() ->preload() ->relationship('eventTypes', 'name'), ])->columns(2); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('id')->sortable(), Tables\Columns\TextColumn::make('name')->searchable(), Tables\Columns\TextColumn::make('icon'), Tables\Columns\TextColumn::make('color'), Tables\Columns\IconColumn::make('is_active')->boolean(), Tables\Columns\TextColumn::make('sort_order')->sortable(), ]) ->filters([]) ->actions([ Actions\EditAction::make(), ]) ->bulkActions([ Actions\DeleteBulkAction::make(), ]); } public static function getPages(): array { return [ 'index' => Pages\ManageEmotions::route('/'), 'import' => Pages\ImportEmotions::route('/import'), ]; } }