import { type Connectable, type EdgelessElement, type Selectable } from '../../_common/types.js';
import { AStarRunner, Bound, type Connection, type ConnectorElement, type IVec, Overlay, PointLocation } from '../../surface-block/index.js';
import type { SurfaceBlockComponent } from '../../surface-block/surface-block.js';
import type { EdgelessPageBlockComponent } from './edgeless-page-block.js';
export type OrthogonalConnectorInput = {
    startBound: Bound | null;
    endBound: Bound | null;
    startPoint: PointLocation;
    endPoint: PointLocation;
};
export declare function isConnectorAndBindingsAllSelected(connector: ConnectorElement, selected: Selectable[]): boolean;
export declare function getAnchors(ele: Connectable): {
    point: PointLocation;
    coord: IVec;
}[];
export declare function getNearestConnectableAnchor(ele: Connectable, point: IVec): PointLocation;
export declare class ConnectionOverlay extends Overlay {
    surface: SurfaceBlockComponent;
    points: IVec[];
    highlightPoint: IVec | null;
    bound: Bound | null;
    render(ctx: CanvasRenderingContext2D): void;
    clear(): void;
}
export declare class ConnectorPathGenerator {
    private options;
    protected _aStarRunner: AStarRunner | null;
    constructor(options: {
        pickById: (id: string) => EdgelessElement | Connectable | null;
        refresh: () => void;
    });
    private _getConnectorEndElement;
    private _getConnectionPoint;
    private _generateStraightConnectorPath;
    private _computeStartEndPoint;
    private _generateCurveConnectorPath;
    private _prepareOrthogonalConnectorInfo;
    private _generateConnectorPath;
    updatePath(connector: ConnectorElement, path?: PointLocation[]): void;
    generateOrthogonalConnectorPath(input: OrthogonalConnectorInput): number[][];
    hasRelatedElement(connecter: ConnectorElement): boolean;
}
export declare class EdgelessConnectorManager extends ConnectorPathGenerator {
    private _edgeless;
    private _connectionOverlay;
    constructor(_edgeless: EdgelessPageBlockComponent);
    private _findConnectablesInViewport;
    searchConnection(point: IVec, excludedIds?: string[]): Connection;
    clear(): void;
    updateConnection(connector: ConnectorElement, point: IVec, connection: 'source' | 'target'): void;
    updateXYWH(connector: ConnectorElement, bound: Bound): void;
    syncConnectorPos(connected: Connectable[]): void;
    detachConnectors(connected: Connectable[]): void;
    getConnecttedConnectors(elements: Connectable[]): ConnectorElement[];
    getConnecttedElements(element: Connectable): Connectable[];
}
//# sourceMappingURL=connector-manager.d.ts.map