'Video in voller Breite, Text darüber', 'left' => 'Video links, Text und Kapitel rechts', 'right' => 'Video rechts, Text und Kapitel links', ]; public static function key(): string { return 'tour'; } public static function label(): string { return 'Rundgang (Video)'; } public static function icon(): string { return 'heroicon-o-film'; } public static function schema(): array { return [ TextInput::make('eyebrow')->label('Kleine Überschrift')->maxLength(100), TextInput::make('heading')->label('Überschrift')->default('Ein Rundgang durch die Wohnung')->maxLength(160), Textarea::make('text')->label('Text')->rows(3)->maxLength(600), static::videoSelect('video_id', 'Video') ->helperText('Webseite › Videos. Das Video lädt erst, wenn Besucher es starten – die Seite bleibt schnell.') ->required(), Radio::make('layout') ->label('Anordnung') ->options(self::LAYOUTS) ->default('left') ->required(), Toggle::make('show_chapters') ->label('Kapitel als Knöpfe zeigen') ->helperText('Die Kapitel pflegen Sie am Video.') ->default(true), ]; } public function data(Theme $theme, array $data): array { $video = $this->video($data['video_id'] ?? null); return [ 'eyebrow' => $data['eyebrow'] ?? null, 'heading' => $data['heading'] ?? null, 'text' => $data['text'] ?? null, 'video' => $video, 'chapters' => ($data['show_chapters'] ?? true) && $video ? $video->chapterList() : [], 'layout' => array_key_exists($data['layout'] ?? '', self::LAYOUTS) ? $data['layout'] : 'left', ]; } }