label('Kleine Überschrift')->maxLength(100), TextInput::make('heading')->label('Überschrift')->required()->maxLength(160), RichEditor::make('text')->label('Text')->toolbarButtons([['bold', 'italic', 'link'], ['bulletList']]), Toggle::make('show_photos')->label('Bilder zeigen')->default(true)->live(), Group::make(static::photoSourceFields('Automatisch: Fotos der Umgebung'))->visible(fn (Get $get): bool => (bool) $get('show_photos')), ]; } public function data(Theme $theme, array $data): array { $address = $theme->property()?->address; return [ 'eyebrow' => $data['eyebrow'] ?? null, 'heading' => $data['heading'] ?? '', 'text' => $this->html($data['text'] ?? null), 'address' => $address, 'mapUrl' => $address ? 'https://www.openstreetmap.org/search?query='.rawurlencode($address) : null, 'photos' => ($data['show_photos'] ?? true) ? $this->sourcedPhotos($theme, $data, PhotoCategory::Area, 6) : collect(), ]; } }