"use client"; import { Handle, Position, type NodeProps } from "@xyflow/react"; import { FlagIcon, PencilIcon } from "lucide-react"; export function OutcomeNode({ data }: NodeProps) { const d = data as { title?: string; text?: string; effects?: Array<{ type: string; value: string }>; }; const effects = d.effects ?? []; return (
{d.title || "Untitled Outcome"}
{d.text || "No description."}
Effects {effects.length === 0 ? ( None ) : ( effects.map((eff, i) => (
{eff.type} : {eff.value}
)) )}
); }