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 der Umgebung zeigen')->default(true), ]; } public static function photoSlots(): array { return ['photo_ids' => ['label' => 'Bilder der Umgebung', 'type' => self::SLOT_COLLECTION]]; } 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->withSeasonalPhotos($theme, $data, 'photo_ids', Photo::query()->published()->with('media')->where('category', PhotoCategory::Area)->limit(6)->get()) : collect(), ]; } }