import { type CSSProperties, Component, type ContextType } from "react";
import { OverlayContext } from "./OverlayContext.js";
import { type IOverlayProps, type IOverlayState } from "./typings.js";
export declare const POSITION_SAME_AS_TARGET = "sameAsTarget";
/**
 * @internal
 */
export declare class Overlay<T = HTMLElement> extends Component<IOverlayProps<T>, IOverlayState> {
    static defaultProps: Partial<IOverlayProps<any>>;
    private readonly id;
    private overlayRef;
    private containerRef;
    private resizeHandler;
    private portalNode;
    private isComponentMounted;
    private clickedInside;
    private alignmentTimeoutId;
    static contextType: import("react").Context<import("./OverlayController.js").OverlayController | undefined>;
    context: ContextType<typeof OverlayContext>;
    private observer;
    constructor(props: IOverlayProps<T>);
    UNSAFE_componentWillMount(): void;
    componentDidMount(): void;
    UNSAFE_componentWillReceiveProps(nextProps: IOverlayProps<T>): void;
    shouldComponentUpdate(nextProps: IOverlayProps<T>, nextState: IOverlayState): boolean;
    componentDidUpdate(): void;
    componentWillUnmount(): void;
    render(): import("react/jsx-runtime").JSX.Element;
    align: () => void;
    private calculateConstrainedAlignment;
    private clearAlignmentTimeout;
    private alignWithTimeout;
    private onMaskClick;
    protected getZIndex(): number | undefined;
    getOverlayStyles: () => CSSProperties;
    private getOverlayClasses;
    /**
     * Add CSS classes to overlay wrapper, so they can be used
     * for position of arrows and stuff
     */
    private getAlignClasses;
    private getVisibilityClass;
    private createPortalNode;
    private removePortalNodeAfterAllTreeUnmount;
    private isSameAsTargetPosition;
    private isEventOnParent;
    private shouldCloseOnClick;
    private hasClickedOnIgnoredNode;
    private isAligned;
    private isElementInChildOverlay;
    onDocumentMouseDown(e: MouseEvent): void;
    closeOnParentScroll(e: MouseEvent): void;
    closeOnMouseDrag: () => void;
    closeOnOutsideClick(e: Event): void;
    closeOnEscape(e: KeyboardEvent): void;
    private updateListeners;
    private addListeners;
    private removeListeners;
    private renderMask;
    private createResizeObserver;
    private hasVisiblePartChanged;
}
//# sourceMappingURL=Overlay.d.ts.map