import React from 'react' import { useNodes, BezierEdge } from 'reactflow' import { getSmartEdge } from '../getSmartEdge' import type { EdgeData, NodeData } from './DummyData' import type { EdgeProps } from 'reactflow' const size = 20 export function SmartEdgeCustomLabel(props: EdgeProps) { const { id, sourcePosition, targetPosition, sourceX, sourceY, targetX, targetY, style, markerStart, markerEnd } = props const nodes = useNodes() const getSmartEdgeResponse = getSmartEdge({ sourcePosition, targetPosition, sourceX, sourceY, targetX, targetY, nodes }) if (getSmartEdgeResponse === null) { return } const { edgeCenterX, edgeCenterY, svgPathString } = getSmartEdgeResponse return ( <>
) }