export type PositionType = 'top' | 'right' | 'bottom' | 'left' | 'nw' | 'sw' | 'ne' | 'se';
export type AlignType = 'start' | 'center' | 'end' | 'fill';
export interface Constraints {
    position: PositionType;
    /**
     * The alignment of the target element relative to the anchor element and the position constraint.
     * The nw, ne, se, sw positions do not support any alignment. If any is given it will be ignored.
     */
    align?: AlignType;
    /**
     * A gap size between the anchor element and the target element.
     */
    gap?: number;
    /**
     * Whether the element should be displayed in a way that it covers the anchor element.
     * This modifier change the interpretation of the position and alignment
     */
    cover?: boolean;
    /**
     * the minimum width in pixels accepted to display the target element.
     * if the width contraint is not satisfied the element will be displayed in the opposite direction.
     */
    minWidth?: number;
    /**
     * the minimum height in pixels accepted to display the target element.
     * if the height contraint is not satisfied the element will be displayed in the opposite direction
     */
    minHeight?: number;
}
export interface Position {
    rect: DOMRect;
    /**
     * If true then the element must use the computed width, otherwise it should preserve his current width
     */
    constrainWidth: boolean;
    /**
     * If true then the element must use the computed height, otherwise it should preserve his current height
     */
    constrainHeight: boolean;
    /**
     * The position constraints used to compute the position
     */
    position: PositionType;
    /**
     * The alignment constraints used to compute the position
     */
    align?: AlignType;
}
/**
 * Compute the position by trying to adjust the constraints until the computed position fits into the client area.
 * Returns the best position that fits the constraints.
 * @param constraints
 * @param elemRect
 * @param anchorRect
 * @param clientRect
 * @returns null if the element cannot be positioned otherwise returns a position object
 */
export declare function computePosition(constraints: Constraints, elemRect: DOMRect, anchorRect: DOMRect, clientRect: DOMRect): Position | null;
//# sourceMappingURL=position.d.ts.map