import type { EuiPopoverPosition } from './types';
export declare const POSITIONS: EuiPopoverPosition[];
interface BoundingBox {
    [position: string]: number;
    top: number;
    right: number;
    bottom: number;
    left: number;
}
export interface EuiClientRect extends BoundingBox {
    height: number;
    width: number;
}
interface FindPopoverPositionArgs {
    anchor: HTMLElement;
    popover: HTMLElement;
    host?: HTMLElement | null;
    align?: EuiPopoverPosition;
    position: EuiPopoverPosition;
    forcePosition?: boolean;
    buffer?: number | [number, number, number, number];
    offset?: number;
    allowCrossAxis?: boolean;
    container?: HTMLElement;
    arrowConfig?: {
        arrowWidth: number;
        arrowBuffer: number;
    };
    returnBoundingBox?: boolean;
}
interface FindPopoverPositionResult {
    top: number;
    left: number;
    position: 'top' | 'right' | 'bottom' | 'left';
    fit: number;
    arrow?: {
        left: number;
        top: number;
    };
    anchorBoundingBox?: EuiClientRect;
}
/**
 * Calculates the absolute positioning (relative to document.body) to place a popover element
 *
 * @param anchor {HTMLElement} Element to anchor the popover to
 * @param popover {HTMLElement} Element containing the popover content
 * @param position {string} Position the user wants. One of ["top", "right", "bottom", "left"]
 * @param [forcePosition] {boolean} If true, use only the provided `position` value and don't try any other position
 * @param host {HTMLElement} Element the popover must be positioned relative to
 * @param [align] {string} Cross-axis alignment. One of ["top", "right", "bottom", "left"]
 * @param [buffer=16] {number} Minimum distance between the popover and the bounding container
 * @param [offset=0] {number} Distance between the popover and the anchor
 * @param [allowCrossAxis=true] {boolean} Whether to allow the popover to be positioned on the cross-axis
 * @param [container] {HTMLElement} Element the popover must be constrained to fit within
 * @param [arrowConfig] {{arrowWidth: number, arrowBuffer: number}} If
 *  present, describes the size & constraints for an arrow element, and the
 *  function return value will include an `arrow` param with position details
 *
 * @returns {FindPopoverPositionResult} absolute page coordinates for the
 * popover, and the placement's relation to the anchor or undefined
 * there's no room.
 */
export declare function findPopoverPosition({ anchor, popover, align, position, forcePosition, host, buffer, offset, allowCrossAxis, container, arrowConfig, returnBoundingBox }: FindPopoverPositionArgs): FindPopoverPositionResult;
interface GetPopoverScreenCoordinatesArgs {
    position: EuiPopoverPosition;
    align?: EuiPopoverPosition;
    anchorBoundingBox: EuiClientRect;
    popoverBoundingBox: EuiClientRect;
    windowBoundingBox: EuiClientRect;
    containerBoundingBox: EuiClientRect;
    arrowConfig?: {
        arrowWidth: number;
        arrowBuffer: number;
    };
    offset?: number;
    buffer?: number | [number, number, number, number];
}
interface GetPopoverScreenCoordinatesResult {
    top: number;
    left: number;
    fit: number;
    arrow: {
        top: number;
        left: number;
    } | undefined;
}
/**
 * Given a target position and the popover's surrounding context, returns either an
 * object with {top, left} screen coordinates or `null` if it's not possible to show
 * content in the target position
 * @param position {string} the target position, one of ["top", "right", "bottom", "left"]
 * @param align {string} target alignment on the cross-axis, one of ["top", "right", "bottom", "left"]
 * @param anchorBoundingBox {Object} bounding box of the anchor element
 * @param popoverBoundingBox {Object} bounding box of the popover element
 * @param windowBoundingBox {Object} bounding box of the window
 * @param containerBoundingBox {Object} bounding box of the container
 * @param [arrowConfig] {{arrowWidth: number, arrowBuffer: number}} If present, describes the size &
 *  constraints for an arrow element, and the function return value will include an `arrow` param
 *  with position details
 * @param [offset=0] {number} Distance between the popover and the anchor
 * @param [buffer=0] {number} Minimum distance between the popover's
 *  placement and the container edge
 *
 * @returns {GetPopoverScreenCoordinatesResult}
 *  object with top/left coordinates, the popover's relative position to the anchor, and how well the
 *  popover fits in the location (0.0 -> 1.0) coordinates and the popover's relative position, if
 *  there is no room in this placement then null
 */
export declare function getPopoverScreenCoordinates({ position, align, anchorBoundingBox, popoverBoundingBox, windowBoundingBox, containerBoundingBox, arrowConfig, offset, buffer }: GetPopoverScreenCoordinatesArgs): GetPopoverScreenCoordinatesResult;
/**
 * Finds the client pixel coordinate of each edge for the element's bounding box,
 * and the bounding box's width & height
 *
 * @param {HTMLElement} element
 * @returns {{top: number, right: number, bottom: number, left: number, height: number, width: number}}
 */
export declare function getElementBoundingBox(element: HTMLElement): EuiClientRect;
/**
 * Calculates the available content space between anchor and container
 *
 * @param {Object} anchorBoundingBox Client bounding box of the anchor element
 * @param {Object} containerBoundingBox Client bounding box of the container element
 * @param {number} buffer Minimum distance between the popover and the bounding container
 * @param {number} offset Distance between the popover and the anchor
 * @param {string} offsetSide Side the offset needs to be applied to, one
 *  of ["top", "right", "bottom", "left"]
 * @returns {{top: number, right: number, bottom: number, left: number}}
 */
export declare function getAvailableSpace(anchorBoundingBox: BoundingBox, containerBoundingBox: BoundingBox, buffer: number | [number, number, number, number], offset: number, offsetSide: EuiPopoverPosition): BoundingBox;
/**
 * Computes the fit (overlap) of the content within the container, fit is in range 0.0 => 1.0
 * @param contentBoundingBox bounding box of content to calculate fit for
 * @param containerBoundingBox bounding box of container
 * @returns {number}
 */
export declare function getVisibleFit(contentBoundingBox: BoundingBox, containerBoundingBox: BoundingBox): number;
/**
 * Calculates the intersection space between two bounding boxes
 *
 * @param firstBox
 * @param secondBox
 * @returns {EuiClientRect}
 */
export declare function intersectBoundingBoxes(firstBox: BoundingBox, secondBox: BoundingBox): EuiClientRect;
/**
 * Returns the top-most defined z-index in the element's ancestor hierarchy
 * relative to the `target` element; if no z-index is defined, returns 0
 * @param element {HTMLElement}
 * @param cousin {HTMLElement}
 * @returns {number}
 */
export declare function getElementZIndex(element: HTMLElement, cousin: HTMLElement): number;
export {};
//# sourceMappingURL=index.d.ts.map