import { BaseEdge, EdgeLabelRenderer, getSmoothStepPath } from '@xyflow/react';
const EDGE_COLORS = {
imports: '#94a3b8',
api_call: '#38bdf8',
database: '#10b981',
event: '#f59e0b',
inheritance: '#8b5cf6',
};
export default function CustomEdge({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, data, markerEnd, label }) {
const [edgePath, labelX, labelY] = getSmoothStepPath({
sourceX,
sourceY,
sourcePosition,
targetX,
targetY,
targetPosition,
borderRadius: 18,
});
const color = EDGE_COLORS[data?.edgeType] || '#64748b';
return (
<>
{label && (
{label}
)}
>
);
}