import VizWorkspaceElement from '../../elements/VizWorkspaceElement.js';
export declare const observeItems: 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 dragEnterHandler: unique symbol;
export declare const dragOverHandler: unique symbol;
export declare const dropHandler: unique symbol;
export declare const dragHandler: unique symbol;
export declare const observeCurrent: unique symbol;
export declare const unobserveCurrent: unique symbol;
export declare const connectedValue: unique symbol;
interface DragInfo {
    /**
     * click x position inside the dragged element
     */
    sx: number;
    /**
     * click y position inside the dragged element
     */
    sy: number;
    target: HTMLElement;
}
/**
 * A plugin that adds drag and drop support to the visualization workspace.
 *
 * This is a base class that meant to be extended depending on what the workspace visualizes.
 * The implementation for a specific type of a workspace should override the `dropExternal()`
 * function to handle dropping onto the workspace a new object.
 *
 * Additionally the `[dropHandler]()` can be updated to handle custom logic for drop action of
 * already visualized object. The default behavior is to reposition all currently selected elements
 * relative to the dragged object position change.
 *
 * After the workspace is created initialize this class and call the `connect()` function to initialize
 * event listeners. When the plugin is no longer needed call `disconnect()` function to clean up listeners.
 *
 * For the visualized elements to be draggable set `draggable="true"` attribute on the element. If the attribute
 * is removed or changed the internal logic adds or removed the events from the element.
 */
export declare class DragAndDropPlugin {
    workspace: VizWorkspaceElement;
    [connectedValue]: boolean;
    [mutationObserver]?: MutationObserver;
    dragInfo?: DragInfo;
    /**
     * @returns True when the plug-in is listening for the input events.
     */
    get connected(): boolean;
    constructor(workspace: VizWorkspaceElement);
    connect(): void;
    disconnect(): void;
    /**
     * Sets drag info value from the drag event
     */
    setDragInfo(e: DragEvent): void;
    /**
     * Repositions currently selected elements from a drop event.
     * This is called when the dropped element onto the workspace comes from the same workspace.
     */
    repositionFromDrop(e: DragEvent): void;
    /**
     * This function is called when a new object is dropped onto the workspace.
     * A "new object" is an object that has a source different than the current workspace.
     */
    dropExternal(e: DragEvent): Promise<void>;
    /**
     * @returns True if the element can be dragged.
     */
    isDraggable(element: Element): boolean;
    /**
     * 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[]): void;
    /**
     * Processes added children.
     * It adds drag and drop support.
     */
    [processAddedNodes](list: NodeList): void;
    /**
     * Processes removed children.
     * It removes drag and drop support.
     */
    [processRemovedNodes](list: NodeList): void;
    /**
     * Adds or removes the `dragstart` event listener depending on the value oif the `draggable` attribute
     */
    [processAttributeChanged](node: Node): void;
    /**
     * Handles the drag event on one of the children.
     */
    [dragHandler](e: DragEvent): void;
    /**
     * Handles the drag enter event on one of the children.
     */
    [dragEnterHandler](e: DragEvent): void;
    /**
     * Handles the drag over event on one of the children.
     */
    [dragOverHandler](e: DragEvent): void;
    /**
     * Handles the drop event on one of the visualization canvas to update position of them.
     *
     * Note, some workspace elements can handle its own drop event and cancel it. In this case
     * this function won't be called.
     */
    [dropHandler](e: DragEvent): Promise<void>;
    /**
     * Observers all current draggable items in the workspace.
     */
    [observeCurrent](): void;
    /**
     * Removes drag start listener from all current draggable items in the workspace.
     */
    [unobserveCurrent](): void;
}
export {};
//# sourceMappingURL=DragAndDropPlugin.d.ts.map