export type Point = {
    x: number;
    y: number;
};
export type Rect = {
    x: number;
    y: number;
    width: number;
    height: number;
};
export type RouteResult = {
    points: Point[];
};
export type ConnectionSide = 'top' | 'bottom' | 'left' | 'right';
/**
 * Determine which side of a rectangle a connection should attach to,
 * based on the relative position of the other node's center.
 */
export declare function determineSide(nodeRect: Rect, otherCenter: Point): ConnectionSide;
/**
 * Get the default port point for a given side of a rectangle (center of the side).
 */
export declare function sideCenter(rect: Rect, side: ConnectionSide): Point;
/**
 * Distribute multiple connection points evenly along a border side of a node.
 * Returns the computed port points ordered by the angular position of their targets.
 */
export declare function distributeConnectionPoints(nodeRect: Rect, connectedEdges: Array<{
    targetCenter: Point;
    side: ConnectionSide;
}>): Point[];
/**
 * Route an edge between two rectangles using orthogonal (Manhattan) routing.
 * Produces L-shaped (2 segments) or Z-shaped (3 segments) paths.
 * Avoids obstacles by adding detour segments when needed.
 */
export declare function routeEdge(sourceRect: Rect, targetRect: Rect, sourcePort: Point, targetPort: Point, obstacles: Rect[]): RouteResult;
