'use client'; import { useMemo } from 'react'; import { Handle, Position } from 'reactflow'; import { useConceptOptions } from '@/context/ConceptOptionsContext'; import { ISyntaxTreeNode } from '@/models/rslang'; import { colorBgSyntaxTree } from '@/styling/color'; import { labelSyntaxTree } from '@/utils/labels'; /** * Represents graph AST node internal data. */ interface ASTNodeInternal { id: string; data: ISyntaxTreeNode; dragging: boolean; xPos: number; yPos: number; } function ASTNode(node: ASTNodeInternal) { const { colors } = useConceptOptions(); const label = useMemo(() => labelSyntaxTree(node.data), [node.data]); return ( <>
3 ? 12 : 14 }} > {label}
); } export default ASTNode;