import type { Node } from '@/app/components/workflow/types' import { memo, } from 'react' import { Handle, Position, } from 'reactflow' import { BlockEnum, } from '@/app/components/workflow/types' import { cn } from '@/utils/classnames' type NodeHandleProps = { handleId: string handleClassName?: string } & Pick export const NodeTargetHandle = memo(({ data, handleId, handleClassName, }: NodeHandleProps) => { const connected = data._connectedTargetHandleIds?.includes(handleId) return ( <> ) }) NodeTargetHandle.displayName = 'NodeTargetHandle' export const NodeSourceHandle = memo(({ data, handleId, handleClassName, }: NodeHandleProps) => { const connected = data._connectedSourceHandleIds?.includes(handleId) return ( ) }) NodeSourceHandle.displayName = 'NodeSourceHandle'