import { LineSketch } from './LineSketch.js';
import VizWorkspaceElement from '../elements/VizWorkspaceElement.js';
import { Point } from './Point.js';
export declare const connectedValue: unique symbol;
export declare const mouseDownHandler: unique symbol;
export declare const mouseMoveHandler: unique symbol;
export declare const mouseUpHandler: unique symbol;
export declare const keydownHandler: unique symbol;
export interface EdgeCreateInfo {
    /**
     * The slot name of the source object.
     */
    slot: string;
    /**
     * The workspace coordinates of the staring point
     */
    point: Point;
    /**
     * The domain element that is the source of the association.
     */
    source: HTMLElement;
}
export interface IEdgeUpdateInfo {
    /**
     * The name of the tip that is being dragged.
     * It's either `start` or `end`.
     */
    direction: string;
    /**
     * The association domain id.
     */
    id: string;
    /**
     * The start point of the line
     */
    sp: Point;
    /**
     * The end point of the line
     */
    ep: Point;
}
/**
 * A helper that allows to manually draw a line from one visualization object to another.
 * The visualization object has to have the `data-association-slots` attribute set on the element
 * and the mouse event target having the `data-association-slot` attribute with the index of the slot.
 *
 * The association line can be drawn to another object that has both attributes.
 *
 * After the user finish a DOM event is dispatched from the visualization workspace.
 */
export declare class AssociationAnchors {
    workspace: VizWorkspaceElement;
    [connectedValue]: boolean;
    /**
     * Whether a line is being constructed.
     */
    drawing: boolean;
    /**
     * A reference to the currently injected SVG element.
     */
    lineElement?: SVGElement;
    /**
     * Whether an association position is being updated.
     * In such case it dispatches different event at the end.
     */
    updating: boolean;
    /**
     * The processor used to draw lines
     */
    lineProcessor: LineSketch;
    /**
     * Set when a new association is being created
     */
    createInfo?: EdgeCreateInfo;
    /**
     * Set when an association update is performed
     */
    updateInfo?: IEdgeUpdateInfo;
    constructor(workspace: VizWorkspaceElement);
    /**
     * Starts listening for the user events
     */
    connect(): void;
    /**
     * Stops listening for the user events
     */
    disconnect(): void;
    findSlotParent(path: Node[]): Element;
    [mouseDownHandler](e: MouseEvent): void;
    [mouseMoveHandler](e: MouseEvent): void;
    [mouseUpHandler](e: MouseEvent): void;
    [keydownHandler](e: KeyboardEvent): void;
    /**
     * Cancels the operation.
     */
    cancel(): void;
    /**
     * Clears variables set in the `start()` function.
     */
    cleanup(): void;
    start(domainObject: HTMLElement, slot: string, startPoint: Point): void;
    /**
     * @param key The domain id of the association being updated
     * @param dir The name of the tip that is being dragged.
     */
    startUpdate(key: string, dir: string): void;
    end(id: string, slot: string, endPoint: Point): void;
    endUpdate(id: string, slot: string, endPoint: Point): void;
    /**
     * Insets a child with a line definition into the workspace's SVG element.
     * @param start The starting point of the line
     * @param end The ending point of the line
     */
    addLine(start: Point, end: Point): void;
    /**
     * Removes the previously added line from the SVG
     */
    removeLine(): void;
    /**
     * Updates the end position of the line.
     * @param {Point} point
     */
    updateLinePosition(point: Point): void;
    /**
     * Listens for the mouse move and mouse up events to draw the line and finish the operation.
     * This is only initialized when starting drawing a line.
     */
    listenDargEvents(): void;
    /**
     * Removes previously registered events.
     */
    unlistenDargEvents(): void;
}
//# sourceMappingURL=AssociationAnchors.d.ts.map