import VizWorkspaceElement from '../elements/VizWorkspaceElement.js';
import { Point } from './Point.js';
import { IEdgeDirections } from './types.js';
/**
 * Computes a point from the `x` and `y` coordinates of the viewport and applies
 * the current scale to it to correctly position the click coordinates.
 *
 * @param wrapper The relatively positioned wrapper
 * @param container The absolutely positioned container
 * @param scale The current scale applied to the container
 * @returns A point with x and y scaled coordinates.
 */
export declare function clickPoint(x: number, y: number, wrapper: HTMLElement, container: HTMLElement, scale: number): Point;
/**
 * Computes a point from the `x` and `y` coordinates of the viewport and applies
 * the current scale to it to correctly position the click coordinates.
 *
 * @param workspace The workspace element
 * @returns A point with x and y scaled coordinates.
 */
export declare function getRelativeClickPoint(x: number, y: number, workspace: VizWorkspaceElement): Point;
/**
 * Computes the direction for both start and end points relative to their
 * shapes.
 * The `end` property describes the direction of an abstract arrow would be pointing to.
 * The `start` is the direction facing the beginning of the path.
 *
 * @param sp The start point to calculate the direction from
 * @param ep The end point to calculate the direction to
 * @param sBox DOM rectangle of the source
 * @param eBox DOM rectangle of the target
 */
export declare function findDirection(sp: Point, ep: Point, sBox: DOMRect, eBox: DOMRect): IEdgeDirections;
/**
 * Finds a pair of points closest to each other but from both sets.
 * This is a brut force method. These objects have up to 12 anchor points so it
 * doesn't really matter as much. Though, when generating a complex diagram
 * with auto-layout it may process a number of items which would require
 * finding a better algorithm.
 *
 * @param s1 First set.
 * @param s2 Second set.
 * @param avoid1 Avoid these points (when possible) from the set1
 * @param avoid2 Avoid these points (when possible) from the set2
 * @returns A list of two points closest to each other or null if there were no points in the set.
 */
export declare function closetsPair(s1: Point[], s2: Point[], avoid1?: Point[], avoid2?: Point[]): Point[] | null;
/**
 * Filters out invalid points
 */
export declare function filterPoints(points: Point[]): Point[];
/**
 * Computes a point of the click inside the workspace element (not the content wrapper).
 * This then can be used to position elements that are not inside the visualization
 * workspace.
 *
 * @param workspace The workspace element
 * @returns A point with x and y scaled coordinates.
 */
export declare function getWorkspaceClick(x: number, y: number, workspace: VizWorkspaceElement): Point;
export declare function getObjectBoundingClientRect(element: Element, workspace: VizWorkspaceElement): DOMRect;
/**
 * Dispatches the `positionchange` custom event on an element that has been positioned.
 *
 * @param dx The difference in the `x` position in relation to the object position before the move
 * @param dy The difference in the `y` position in relation to the object position before the move
 */
export declare function notifyMoved(element: EventTarget, dx: number, dy: number): void;
//# sourceMappingURL=PositionUtils.d.ts.map