import { Handle, Position, type NodeProps } from '@xyflow/react' import { Bot, CircleDot, Flag, GitBranch, Hand, Wrench } from 'lucide-react' import type { WorkflowNode as WNode } from './types' const icons = { Input: CircleDot, 'AI Worker': Bot, 'Decision Rules': GitBranch, 'Human Review': Hand, 'Simulated Tool': Wrench, Output: Flag } export default function WorkflowNode({ data, selected }: NodeProps) { const Icon = icons[data.mode] const receivesFlow = data.mode !== 'Input' && data.mode !== 'Simulated Tool' const sendsFlow = data.mode !== 'Output' && data.mode !== 'Simulated Tool' return
{receivesFlow && } {data.mode === 'Simulated Tool' && }
{data.mode}{data.label}
{sendsFlow && } {data.mode === 'AI Worker' && } {data.mode === 'AI Worker' && TOOLS}
}