import { LineSketch } from './LineSketch.js';
import { TipSketch } from './TipSketch.js';
import { ICalculateEdgeOptions, IEdgeDirections, IWorkspaceEdge } from './types.js';
import VizWorkspaceElement from '../elements/VizWorkspaceElement.js';
import VizAssociationElement from '../elements/VizAssociationElement.js';
import { IAssociationSlots, IAssociationVertexes, ILineTips, IVisualizationAssociationShape } from './VisualizationTypes.js';
import { Point } from './Point.js';
export declare const observeItems: unique symbol;
export declare const clickHandler: unique symbol;
export declare const mouseOverHandler: unique symbol;
export declare const mouseOutHandler: unique symbol;
export declare const mutationHandler: unique symbol;
export declare const mutationObserver: unique symbol;
export declare const processAddedNodes: unique symbol;
export declare const processRemovedNodes: unique symbol;
export declare const processAttributeChanged: unique symbol;
export declare const connectedValue: unique symbol;
export declare const processAddedAssociation: unique symbol;
export declare const processRemovedAssociation: unique symbol;
export declare const processAddedNode: unique symbol;
export declare const processRemovedNode: unique symbol;
export declare const edgesValue: unique symbol;
export declare const associationClickHandler: unique symbol;
export declare const deselectAllEdges: unique symbol;
export declare const calculateEdge: unique symbol;
export declare const processQueue: unique symbol;
export declare const processQueueDebouncer: unique symbol;
export declare const updateAssociationById: unique symbol;
export declare const calculateNearestPoints: unique symbol;
export declare const readEventTarget: unique symbol;
/**
 * A class that manages drawing edges between the nodes in the workspace visualization.
 *
 * This class looks for the `viz-association` elements inside other elements
 * and when the association has a valid (existing) target then it creates an internal model for the edge
 * visualization and sets it on the workspace to be rendered.
 *
 * This class also manages selection state of the edge.
 */
export declare class WorkspaceEdges {
    workspace: VizWorkspaceElement;
    [connectedValue]: boolean;
    /**
     * @returns True when the plug-in is listening for the input events.
     */
    get connected(): boolean;
    [edgesValue]: Map<string, IWorkspaceEdge>;
    /**
     * @returns The edges to be visualized in the workspace.
     */
    get edges(): Map<string, IWorkspaceEdge>;
    /**
     * When an association is changed in the DOM it is held in this array to process them asynchronously
     * in the future, when the workspace is updated.
     */
    [processQueue]: VizAssociationElement[];
    /**
     * The processor used to draw lines
     */
    lineProcessor: LineSketch;
    /**
     * The processor used to draw tips on the line
     */
    tipProcessor: TipSketch;
    [mutationObserver]?: MutationObserver;
    constructor(workspace: VizWorkspaceElement);
    /**
     * Starts listening on user events
     */
    connect(): void;
    /**
     * Creates associations for the current state of the canvas.
     */
    associateCurrent(): void;
    /**
     * Initializes events when the workspace DOM is rendered.
     */
    listenContent(): void;
    /**
     * Cleans up the listeners
     */
    disconnect(): void;
    /**
     * Clear all edges from the workspace
     */
    clear(): void;
    /**
     * Forces to re-calculate all existing edges.
     */
    recalculate(): Promise<void>;
    /**
     * Reads an edge definition by the association id.
     */
    get(key: string): IWorkspaceEdge | undefined;
    /**
     * Removes an edge and notifies workspace to update.
     */
    removeEdge(id: string): void;
    /**
     * Updates associations (in and out) for an element identified by the `key` attribute.
     * The element must be one of the visualized elements in the workspace.
     *
     * This is to be used when position and or size of an element that has associations change.
     *
     * @param key The domain id of the visualized element that has changed.
     */
    update(key: string): Promise<void>;
    /**
     * Computes workspace edge object for source and target.
     *
     * @param source The domain id of the source element
     * @param target The domain id of the target element
     * @param id The domain id of the association
     * @param name The label rendered in the association
     */
    [updateAssociationById](source: string, target: string, id: string, name?: string): IWorkspaceEdge | null;
    /**
     * Creates a internal data model for the edge drawn between an association source and the target.
     * @param assocElement The viz-association element reference
     * @param targetElement The target element reference.
     */
    buildAssociationEdge(assocElement: VizAssociationElement, targetElement: HTMLElement): void;
    /**
     */
    findOtherAssociations(sourceElement: HTMLElement, targetElement: HTMLElement, assocId: string): IWorkspaceEdge[];
    /**
     * Reads the view model for an association and returns slot definitions for the association.
     *
     * @param assocElement The viz-association element reference
     */
    readAssociationSlots(assocElement: VizAssociationElement): IAssociationSlots;
    /**
     * Calculates the edge between two nodes.
     */
    [calculateNearestPoints](sourceElement: HTMLElement, targetElement: HTMLElement, others?: IWorkspaceEdge[]): Point[] | null;
    /**
     * Calculates the edge between two nodes.
     */
    [calculateEdge](options: ICalculateEdgeOptions): IWorkspaceEdge | undefined;
    discoverAssociationVertexes(options: ICalculateEdgeOptions): IAssociationVertexes | undefined;
    /**
     * When defined and correctly configured it returns position of the slots of the source and the target.
     */
    discoverSlotPoints(options: ICalculateEdgeOptions): IAssociationVertexes | undefined;
    /**
     * Creates edge's markers definition from the association element.
     * The association element can have the following attributes set:
     * - data-marker-end
     * - data-marker-start
     * With a value of a marker name defined in the visualization workspace.
     *
     * @param assocElement The association element to read the values from.
     * @param lineShape The definition of the line that the marker is attached to
     * @param directions Computed line directions
     */
    createAssociationTips(assocElement: HTMLElement, lineShape: IVisualizationAssociationShape, directions: IEdgeDirections): ILineTips;
    /**
     * Reads element's `data-style` attribute and returns it.
     * This is used in the edge definition for class name.
     *
     * @param assocElement The association element to read the values from.
     */
    createAssociationStyles(assocElement: HTMLElement): string;
    /**
     * Updates an existing association data model for position
     * @param assocElement The viz-association element reference
     * @param targetElement The target element reference.
     */
    updateAssociationPosition(assocElement: VizAssociationElement, targetElement: HTMLElement): void;
    /**
     * Updates the label of the association in the visualization canvas.
     *
     * @param assocElement The viz-association element reference
     */
    updateAssociationLabel(assocElement: VizAssociationElement): void;
    /**
     * Updates the `markers` property from an association element.
     *
     * @param assocElement The viz-association element reference
     */
    updateEdgeMarker(assocElement: VizAssociationElement): void;
    /**
     * Updates the `styles` property from an association element.
     *
     * @param assocElement The viz-association element reference
     */
    updateEdgeStyles(assocElement: VizAssociationElement): void;
    /**
     * Updates the selection state of the edge
     *
     * @param assocElement The viz-association element reference
     */
    toggleEdgeHighlight(assocElement: VizAssociationElement): void;
    /**
     * Updates the selection state of the edge
     *
     * @param assocElement The viz-association element reference
     */
    toggleEdgeSecondaryHighlight(assocElement: VizAssociationElement): void;
    /**
     * Removes an association edge from the edges list.
     * @param associationId The domain id of the association
     */
    delete(associationId: string): void;
    /**
     * A function that checks whether the associations reported in this class still exist in the workspace.
     */
    syncAssociations(): void;
    /**
     * Searches the DOM for the domain element that has set the `data-key`.
     * It takes into the account the `data-delegate-visualization` attribute.
     *
     * @param target The domain id of the target.
     * @returns The domain element or null if not found.
     */
    findDomainTarget(target: string): HTMLElement | null;
    [processQueueDebouncer]?: number;
    runProcessingQueue(): void;
    /**
     * Adds an association element to the rendering queue and runs the queue.
     */
    queueAssociation(assoc: VizAssociationElement): void;
    /**
     * Observe items change in the element's light DOM
     * @returns The observer handler
     */
    [observeItems](): MutationObserver;
    /**
     * Processes mutations in the workspace and manages selection state.
     * @param mutationsList List of mutations.
     */
    [mutationHandler](mutationsList: MutationRecord[]): Promise<void>;
    /**
     * Processes added to the canvas elements.
     * @param nodes The list of added nodes
     */
    [processAddedNodes](nodes: NodeList): void;
    /**
     * Processes removed from the canvas elements.
     * @param nodes The list of removed nodes
     */
    [processRemovedNodes](nodes: NodeList): void;
    /**
     * Processes changed attribute on any element in the canvas
     * @param mutation The record associated with the change
     */
    [processAttributeChanged](mutation: MutationRecord): void;
    /**
     * If the target exists it creates the model of the association
     * and adds it to the associations list.
     * If the target is not set the association is ignored.
     * If the parent has no `data-key` it is ignored.
     * If the target does not exists it is ignored (handled in processAddedNode)
     */
    [processAddedAssociation](node: VizAssociationElement): void;
    /**
     * If there is an association that corresponds to the `data-key` of the element
     * then it builds the association model.
     */
    [processAddedNode](node: HTMLElement): void;
    /**
     * If the association model exists for this association then it is removed.
     */
    [processRemovedAssociation](node: VizAssociationElement): void;
    /**
     * If the element has an association then this association is removed.
     */
    [processRemovedNode](node: HTMLElement): void;
    /**
     * Handles selection of an association from the SVG element click.
     */
    [clickHandler](e: PointerEvent): void;
    /**
     * Handles mouse over event on the SVG element
     */
    [mouseOverHandler](e: Event): void;
    /**
     * Handles mouse out event on the SVG element
     */
    [mouseOutHandler](e: Event): void;
    [readEventTarget](e: Event): SVGElement | undefined;
    /**
     * Handles the logic when an association visualization was clicked.
     * @param id Association id
     * @param multi Whether multi selection is applied
     */
    [associationClickHandler](id: string, multi?: boolean): void;
    /**
     * Removes selection from all associations
     */
    [deselectAllEdges](): void;
}
//# sourceMappingURL=WorkspaceEdges.d.ts.map