import { memo } from 'react' import type { NodeProps } from 'reactflow' import { Handle, Position, } from 'reactflow' import { useWorkflowContext } from '../context' import { NodeMap, PanelMap, } from './constants' const CustomNode = ({ data, }: NodeProps) => { const NodeComponent = NodeMap[data.type] return ( <> ) } export const Panel = () => { const { selectedNode } = useWorkflowContext() const PanelComponent = PanelMap[selectedNode?.data.type || ''] if (!PanelComponent) return null return ( ) } export default memo(CustomNode)