import React from 'react' import { useNodes, StepEdge } from 'reactflow' import { SmartEdge } from '../SmartEdge' import { svgDrawStraightLinePath, pathfindingJumpPointNoDiagonal } from '../functions' import type { SmartEdgeOptions } from '../SmartEdge' import type { EdgeProps } from 'reactflow' const StepConfiguration: SmartEdgeOptions = { drawEdge: svgDrawStraightLinePath, generatePath: pathfindingJumpPointNoDiagonal, fallback: StepEdge } export function SmartStepEdge( props: EdgeProps ) { const nodes = useNodes() return ( {...props} options={StepConfiguration} nodes={nodes} /> ) }