import { memo, useState } from 'react'; import { Handle, Position } from '@xyflow/react'; import { Bell, Box, Cloud, Code, Cpu, Database, GitBranch, Globe, Layers, Lock, Play } from 'lucide-react'; const ICONS = { Bell, Box, Cloud, Code, Cpu, Database, GitBranch, Globe, Layers, Lock, Play }; function WorkflowNode({ data, selected }) { const [editing, setEditing] = useState(false); const [label, setLabel] = useState(data.label); const isDecision = data.nodeType === 'decision'; const Icon = ICONS[data.iconName] || Cpu; return (
setEditing(true)} className="path-text cursor-text text-xs font-semibold leading-snug text-white"> {label}
)} {data.description &&{data.description}
} > )}