"use client"; import { type NodeProps } from "@xyflow/react"; import { PencilIcon, WaypointsIcon } from "lucide-react"; import { NodeShell } from "./NodeShell"; export function ChoiceNode({ data }: NodeProps) { const d = data as { question?: string; options?: Array<{ id: string; label: string }> }; const options = d.options ?? []; return (
{d.question || "Untitled Choice"}
{options.length === 0 ? ( No options defined. ) : ( options.map((opt) => (
{opt.label}
)) )}
); }