['label' => 'Nachricht', 'default' => 'question', 'type' => 'select', 'options' => ['question' => 'Sind Hunde erlaubt?', 'stay' => 'Ist die Wohnung im Dezember frei?', 'unclear' => 'ok danke']], ]; } public function events(array $inputs): array { $text = match ((string) ($inputs['text'] ?? 'question')) { 'stay' => 'Ist die Wohnung vom 12.12. bis 19.12. frei? Wir würden gern buchen.', 'unclear' => 'ok danke', default => 'Sind Hunde erlaubt und gibt es einen Parkplatz?', }; return [new ScenarioEvent('Nachricht im Chat ohne Vorgang', fn (SandboxContext $context) => app(MessageIntake::class)->handle( new IncomingMessage(Medium::Chat, 'chat-visitor-1', $text, CarbonImmutable::now(), 'tester-'.md5($text)), ))]; } }