import { useState } from "react"; export interface MoonCardProps { themeColor: string; status: "inProgress" | "executing" | "complete"; respond?: (response: string) => void; } export function MoonCard({ themeColor, status, respond }: MoonCardProps) { const [decision, setDecision] = useState<"launched" | "aborted" | null>(null); const handleLaunch = () => { setDecision("launched"); respond?.("You have permission to go to the moon."); }; const handleAbort = () => { setDecision("aborted"); respond?.( "You do not have permission to go to the moon. The user you're talking to rejected the request.", ); }; return (
We made it to the moon!
Staying on Earth 🌍
Mission to the Moon 🌕