import type { FC, MouseEvent as ReactMouseEvent, SVGAttributes } from 'react'; import cc from 'classcat'; import { Position } from '../../types'; const shiftX = (x: number, shift: number, position: Position): number => { if (position === Position.Left) return x - shift; if (position === Position.Right) return x + shift; return x; }; const shiftY = (y: number, shift: number, position: Position): number => { if (position === Position.Top) return y - shift; if (position === Position.Bottom) return y + shift; return y; }; export interface EdgeAnchorProps extends SVGAttributes { position: Position; centerX: number; centerY: number; radius?: number; onMouseDown: (event: ReactMouseEvent) => void; onMouseEnter: (event: ReactMouseEvent) => void; onMouseOut: (event: ReactMouseEvent) => void; type: string; } const EdgeUpdaterClassName = 'react-flow__edgeupdater'; export const EdgeAnchor: FC = ({ position, centerX, centerY, radius = 10, onMouseDown, onMouseEnter, onMouseOut, type, }: EdgeAnchorProps) => ( );