"use client"; import { Handle, Position, type NodeProps } from "@xyflow/react"; import { AlertTriangle, CheckCircle2, Loader2, PauseCircle, XCircle, } from "lucide-react"; import { lookup } from "@/lib/node-catalog"; import { cn } from "@/lib/utils"; import type { FlowNodeData } from "@/lib/pipeline-graph"; export type NodeRunStatus = | "pending" | "running" | "success" | "failed" | "paused"; export function FlowNode({ data, selected }: NodeProps) { const fd = data as FlowNodeData & { runStatus?: NodeRunStatus }; const pn = fd.pipelineNode; const status = fd.runStatus; const entry = lookup(pn.type); const Icon = entry?.icon ?? AlertTriangle; const outputs = entry?.outputs ?? 1; const isTrigger = pn.type === "flow-nodes-base.trigger"; return (