/** @packageDocumentation
 * @module Cursor
 */
import * as React from "react";
import { BeUiEvent } from "@itwin/core-bentley";
import type { XAndY } from "@itwin/core-geometry";
import { RelativePosition } from "@itwin/appui-abstract";
import { Point, Size } from "@itwin/core-react";
/** Options for the [[CursorPopupManager]] open method
 * @public
 */
export interface CursorPopupOptions {
    /** Title of the popup */
    title?: string;
    /** Called on popup close */
    onClose?: () => void;
    /** Callback to apply changes */
    onApply?: () => void;
    /** Draw shadow */
    shadow?: boolean;
}
/** Information maintained by CursorPopupManager about a CursorPopup
 * @internal
 */
interface CursorPopupInfo {
    id: string;
    content: React.ReactNode;
    relativePosition: RelativePosition;
    offset: Point;
    priority: number;
    options?: CursorPopupOptions;
    renderRelativePosition: RelativePosition;
    popupSize?: Size;
}
/** CursorPopup component
 * @public
 */
export declare class CursorPopupManager {
    private static _popups;
    /** @internal */
    static readonly onCursorPopupUpdatePositionEvent: BeUiEvent<{
        pt: XAndY;
    }>;
    /** @internal */
    static readonly onCursorPopupFadeOutEvent: BeUiEvent<{
        id: string;
    }>;
    /** @internal */
    static readonly onCursorPopupsChangedEvent: BeUiEvent<{}>;
    /** @internal */
    static clearPopups(): void;
    static get popups(): CursorPopupInfo[];
    static get popupCount(): number;
    private static _emitPopupsChangedEvent;
    private static pushPopup;
    /** Called to open popup with a new set of properties
     */
    static open(id: string, content: React.ReactNode, pt: XAndY, offset: XAndY, relativePosition: RelativePosition, priority?: number, options?: CursorPopupOptions): void;
    /** Called to update popup with a new set of properties
     */
    static update(id: string, content: React.ReactNode, pt: XAndY, offset: XAndY, relativePosition: RelativePosition, priority?: number): void;
    /** Called to move the open popup to new location
     */
    static updatePosition(pt: XAndY): void;
    /** Called when tool wants to close the popup
     */
    static close(id: string, apply: boolean, fadeOut?: boolean): void;
    private static removePopup;
    private static resetPopupsRenderRelativePosition;
    private static validateRenderRelativePosition;
    private static autoFlip;
}
/** State for the [[CursorPopupRenderer]] React component */
interface CursorPopupRendererState {
    pt: Point;
}
/** CursorPopupRenderer React component.
 * @public
 */
export declare class CursorPopupRenderer extends React.Component<any, CursorPopupRendererState> {
    constructor(props: any);
    render(): React.ReactNode;
    private _handleSizeKnown;
    private renderPositions;
    private renderRelativePosition;
    private getDimension;
    private adjustOffset;
    componentDidMount(): void;
    componentWillUnmount(): void;
    private _handlePopupChangedEvent;
    private _handleCursorPopupUpdatePositionEvent;
}
export {};
//# sourceMappingURL=CursorPopupManager.d.ts.map