import { ElementRef } from '@angular/core';
import { Placement, ConnectionPosition, HorizontalConnectionPos, VerticalConnectionPos } from './position.interface';
import { ConnectedPositionStrategy } from './connected-position.strategy';
import { GlobalPositionStrategy } from './global-position.strategy';
import { ViewportRuler } from './scroll-strategy';
export declare class OverlayPositionService {
    private _viewportRuler;
    /** overlay component for getting its properties such as hasArrow, embedded */
    private overlayComponent;
    /** offset when overlay has Arrow */
    private offsetWhenHasArrow;
    /** attachment element's calculated position */
    originPos: ConnectionPosition;
    /** overlay element's calculated position */
    overlayPos: ConnectionPosition;
    /** overlay element's original position such as 'left-top' */
    placement: Placement;
    /** when split overlay element's original position as '-', the front placement */
    firstPlacement: string;
    /** when split overlay element's original position as '-', the latter placement */
    seconedPlacement: string;
    constructor(_viewportRuler: ViewportRuler);
    /**
     * Set overlay reference
     * @return this
     */
    setOverlayRef(overlayRef: any): this;
    /**
     * Creates a global position strategy
     * @return { GlobalPositionStrategy }
     */
    global(): GlobalPositionStrategy;
    /**
     * Creates a relative position strategy.
     * @param ElementRef
     * @param any
     * @param Placement
     * @return ConnectedPositionStrategy
     */
    attachTo(targetRef: ElementRef, overlayComponent: any, placement: Placement): ConnectedPositionStrategy;
    /**
     * Adds two new preferred fallback position as default
     * @param positionStrategy
     */
    withPosition(positionStrategy: any): void;
    /**
     * Adds first new preferred fallback position
     * @param positionStrategy
     */
    withFirstPositon(positionStrategy: any): void;
    /**
     * Adds second new preferred fallback position
     * @param positionStrategy
     */
    withNextPositon(positionStrategy: any): void;
    /**
     * Subscribe window's srcoll and resize event and once change, update the position
     * @param positionStrategy
     */
    subscribeWindowEvent(positionStrategy: any): void;
    /**
     * Split placement e.g 'bottom-left' by '-'
     * @param positionStrategy
     */
    splitPlacement(placement: Placement): void;
    /**
     * Update position once change
     * @param positionStrategy
     */
    updatePosition(positionStrategy: any): void;
    /**
     * calculate four direction's offset for two preferred fallback position
     * @param ConnectionPositionPair
     * @param ConnectionPositionPair
     * @return object e.g {offsetX, offsetY}
     */
    getOffset(originPos?: ConnectionPosition, overlayPos?: ConnectionPosition): {
        offsetX: number;
        offsetY: number;
    };
    /**
     * change placement to ConnectionPosition, e.g { horizontal: horizontal, vertical: vertical }
     * @return ConnectionPosition
     */
    getOriginPosition(): ConnectionPosition;
    /**
     * throw the error of invalid position
     * @return { string } position
     */
    getInvalidplacementError(position: string): Error;
    /**
     * change placement to ConnectionPosition, e.g { horizontal: horizontal, vertical: vertical }
     * @return { ConnectionPosition } position
     */
    getOverlayPosition(): ConnectionPosition;
    /**
     * Returns the origin position and a fallback position based on the user's position preference.
     * The fallback position is the inverse of the origin (e.g. 'bottom' -> 'top').
     * @return { main: ConnectionPosition, fallback: ConnectionPosition }
     */
    getOrigin(): {
        main: ConnectionPosition;
        fallback: ConnectionPosition;
    };
    /**
     * Returns the overlay position and a fallback position based on the user's preference.
     * @return { main: ConnectionPosition, fallback: ConnectionPosition }
     */
    getOverlay(): {
        main: ConnectionPosition;
        fallback: ConnectionPosition;
    };
    /**
     * Inverts an overlay position.
     * @param { HorizontalConnectionPos } x
     * @param { VerticalConnectionPos } y
     * @return { Point } { x, y }
     */
    invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos): {
        x: HorizontalConnectionPos;
        y: VerticalConnectionPos;
    };
}
