/// <reference types="jquery" />
import { AbstractLayout, DesktopPopupOpenEvent, Dimension, EnumObject, Event, EventHandler, FocusRule, GlassPaneRenderer, InitModelOf, KeyStroke, KeyStrokeContext, Point, PopupEventMap, PopupModel, Rectangle, Widget } from '../index';
export type PopupAlignment = EnumObject<typeof Popup.Alignment>;
export declare class Popup extends Widget implements PopupModel {
    model: PopupModel;
    eventMap: PopupEventMap;
    self: Popup;
    anchorBounds: Rectangle;
    animateOpening: boolean;
    animateResize: boolean;
    anchor: Widget;
    windowPaddingX: number;
    windowPaddingY: number;
    withGlassPane: boolean;
    withFocusContext: boolean;
    initialFocus: () => FocusRule | HTMLElement;
    focusableContainer: boolean;
    horizontalAlignment: PopupAlignment;
    verticalAlignment: PopupAlignment;
    calculatedHorizontalAlignment: PopupAlignment;
    calculatedVerticalAlignment: PopupAlignment;
    horizontalSwitch: boolean;
    verticalSwitch: boolean;
    trimWidth: boolean;
    trimHeight: boolean;
    scrollType: PopupScrollType;
    windowResizeType: PopupWindowResizeType;
    boundToAnchor: boolean;
    withArrow: boolean;
    closeOnAnchorMouseDown: boolean;
    closeOnMouseDownOutside: boolean;
    closeOnOtherPopupOpen: boolean;
    modal: boolean;
    $anchor: JQuery;
    $arrow: JQuery;
    $arrowOverlay: JQuery;
    protected _documentMouseDownHandler: (event: MouseEvent) => void;
    protected _anchorScrollHandler: (event: JQuery.ScrollEvent) => void;
    protected _anchorLocationChangeHandler: EventHandler;
    protected _popupOpenHandler: EventHandler<DesktopPopupOpenEvent>;
    protected _glassPaneRenderer: GlassPaneRenderer;
    protected _openLater: boolean;
    protected _windowResizeHandler: (event: JQuery.ResizeEvent<Window>) => void;
    protected _anchorRenderHandler: EventHandler<Event<Widget>>;
    protected _withGlassPane: boolean;
    protected _closeOnAnchorMouseDown: boolean;
    protected _closeOnMouseDownOutside: boolean;
    protected _closeOnOtherPopupOpen: boolean;
    constructor();
    static Alignment: {
        /**
         * The entire popup is positioned horizontally left of the anchor.
         */
        readonly LEFT: "left";
        /**
         * With arrow: The arrow at the left edge of the popup is aligned horizontally with the center of the anchor.
         * <p>
         * Without arrow: The left edges of both the popup and the anchor are aligned horizontally.
         */
        readonly LEFTEDGE: "leftedge";
        /**
         * The entire popup is positioned vertically above the anchor.
         */
        readonly TOP: "top";
        /**
         * With arrow: The arrow at the top edge of the popup is aligned vertically with the center of the anchor.
         * <p>
         * Without arrow: The top edges of both the popup and the anchor are aligned vertically.
         */
        readonly TOPEDGE: "topedge";
        /**
         * The centers of both the popup and the anchor are aligned in the respective dimension.
         */
        readonly CENTER: "center";
        /**
         * The entire popup is positioned horizontally to the right of the anchor.
         */
        readonly RIGHT: "right";
        /**
         * With arrow: The arrow at the right edge of the popup is aligned horizontally with the center of the anchor.
         * <p>
         * Without arrow: The right edges of both the popup and the anchor are aligned horizontally.
         */
        readonly RIGHTEDGE: "rightedge";
        /**
         * The entire popup is positioned vertically below the anchor.
         */
        readonly BOTTOM: "bottom";
        /**
         * With arrow: The arrow at the bottom edge of the popup is aligned vertically with the center of the anchor.
         * <p>
         * Without arrow: The bottom edges of both the popup and the anchor are aligned vertically.
         */
        readonly BOTTOMEDGE: "bottomedge";
    };
    static SwitchRule: {};
    protected _init(options: InitModelOf<this>): void;
    protected _createKeyStrokeContext(): KeyStrokeContext;
    protected _initKeyStrokeContext(): void;
    /**
     * Override this method to provide a key stroke which closes the popup.
     * The default impl. returns a CloseKeyStroke which handles the ESC key.
     */
    protected _createCloseKeyStroke(): KeyStroke;
    protected _createLayout(): AbstractLayout;
    protected _openWithoutParent(): void;
    /**
     * Only called if parent.rendered or parent.rendering
     */
    protected _getDefaultOpen$Parent(): JQuery;
    open($parent?: JQuery): void;
    validateFocus(): void;
    protected _requestInitialFocus(): void;
    protected _open($parent: JQuery): void;
    render($parent?: JQuery): void;
    protected _render(): void;
    protected _renderProperties(): void;
    protected _postRender(): void;
    protected _onAttach(): void;
    protected _renderOnDetach(): void;
    remove(): void;
    protected _remove(): void;
    protected _destroy(): void;
    protected _renderWithFocusContext(): void;
    setModal(modal: boolean): void;
    protected _setModal(modal: boolean): void;
    protected _renderModal(): void;
    setWithGlassPane(withGlassPane: boolean): void;
    protected _renderWithGlassPane(): void;
    setCloseOnMouseDownOutside(closeOnMouseDownOutside: boolean): void;
    protected _renderCloseOnMouseDownOutside(): void;
    setCloseOnAnchorMouseDown(closeOnAnchorMouseDown: boolean): void;
    setCloseOnOtherPopupOpen(closeOnOtherPopupOpen: boolean): void;
    protected _renderCloseOnOtherPopupOpen(): void;
    setWithArrow(withArrow: boolean): void;
    protected _renderWithArrow(): void;
    protected _updateArrowClass(verticalAlignment?: PopupAlignment, horizontalAlignment?: PopupAlignment): void;
    protected _computeArrowPositionClass(verticalAlignment?: PopupAlignment, horizontalAlignment?: PopupAlignment): string;
    protected _animateRemovalWhileRemovingParent(): boolean;
    protected _isRemovalPrevented(): boolean;
    close(): void;
    /**
     * Install listeners to close the popup once clicking outside the popup,
     * or changing the anchor's scroll position, or another popup is opened.
     */
    protected _attachCloseHandlers(): void;
    protected _attachAnchorHandlers(): void;
    protected _detachAnchorHandlers(): void;
    protected _detachCloseHandlers(): void;
    protected _onDocumentMouseDown(event: MouseEvent): void;
    protected _isMouseDownOutside(event: MouseEvent): boolean;
    protected _isMouseDownOnAnchor(event: MouseEvent): boolean;
    /**
     * Method invoked once a mouse down event occurs outside the popup.
     */
    protected _onMouseDownOutside(event: MouseEvent): void;
    /**
     * Method invoked once the 'options.$anchor' is scrolled.
     */
    protected _onAnchorScroll(event: JQuery.ScrollEvent): void;
    protected _handleAnchorPositionChange(event: JQuery.ScrollEvent | Event): void;
    isOpeningAnimationRunning(): boolean;
    protected _onAnchorLocationChange(event: Event): void;
    /**
     * Method invoked once a popup is opened.
     */
    protected _onPopupOpen(event: DesktopPopupOpenEvent): void;
    setHorizontalAlignment(horizontalAlignment: PopupAlignment): void;
    protected _renderHorizontalAlignment(): void;
    setVerticalAlignment(verticalAlignment: PopupAlignment): void;
    protected _renderVerticalAlignment(): void;
    setHorizontalSwitch(horizontalSwitch: boolean): void;
    protected _renderHorizontalSwitch(): void;
    setVerticalSwitch(verticalSwitch: boolean): void;
    protected _renderVerticalSwitch(): void;
    setTrimWidth(trimWidth: boolean): void;
    protected _renderTrimWidth(): void;
    setTrimHeight(trimHeight: boolean): void;
    protected _renderTrimHeight(): void;
    prefLocation(verticalAlignment?: PopupAlignment, horizontalAlignment?: PopupAlignment): Point;
    protected _prefLocationWithoutAnchor(): Point;
    protected _prefLocationWithAnchor(verticalAlignment?: PopupAlignment, horizontalAlignment?: PopupAlignment): Point;
    protected _alignClasses(): string;
    getAnchorBounds(): Rectangle;
    getWindowSize(): Dimension;
    /**
     * @returns Point the amount of overlap at the window borders.
     * A positive value indicates that it is overlapping the right / bottom border, a negative value indicates that it is overlapping the left / top border.
     * Prefers the right and bottom over the left and top border, meaning if a positive value is returned it does not mean that the left border is overlapping as well.
     */
    overlap(location: Point, includeMargin?: boolean): Point;
    adjustLocation(location: Point, switchIfNecessary?: boolean): Point;
    position(switchIfNecessary?: boolean): void;
    protected _position(switchIfNecessary?: boolean): void;
    setLocation(location: Point): void;
    /**
     * Popups with an anchor must only be visible if the anchor is in view (prevents that the popup points at an invisible anchor)
     */
    protected _validateVisibility(): void;
    protected _isAnchorInView(): boolean;
    protected _triggerLocationChange(): void;
    /**
     * Fire event that this popup is about to open.
     */
    protected _triggerPopupOpenEvent(): void;
    belongsTo($anchor: JQuery): boolean;
    set$Anchor($anchor: JQuery): void;
    isOpen(): boolean;
    ensureOpen(): void;
    setAnchor(anchor: Widget): void;
    protected _setAnchor(anchor: Widget): void;
    protected _onAnchorRender(event: Event<Widget>): void;
    protected _renderAnchor(): void;
    protected _onWindowResize(event: JQuery.ResizeEvent<Window>): void;
    protected _handleGlassPanes(): void;
}
export type PopupScrollType = 'position' | 'layoutAndPosition' | 'remove' | 'none';
export type PopupWindowResizeType = 'position' | 'layoutAndPosition' | 'remove';
//# sourceMappingURL=Popup.d.ts.map