import { BaseEdge, getBezierPath } from 'reactflow'; import type { EdgeProps } from 'reactflow'; interface MergedEdgeData { gradient?: string; isMerged?: boolean; colors?: string[]; } const MergedEdge = ({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, style = {}, data, markerEnd, }: EdgeProps) => { const [edgePath] = getBezierPath({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, }); // If this is a merged trace, create a gradient const isMerged = data?.isMerged; const colors = data?.colors || []; if (isMerged && colors.length >= 2) { const gradientId = `gradient-${id}`; return ( <> {colors.map((color, idx) => ( ))} ); } // Regular edge return ( ); }; export default MergedEdge;