/** @packageDocumentation
 * @module Popup
 */
import * as React from "react";
import { XAndY } from "@itwin/core-geometry";
import { AbstractToolbarProps, DialogLayoutDataProvider, OnCancelFunc, OnItemExecutedFunc, OnValueCommitFunc, Primitives, PropertyDescription, PropertyRecord, RelativePosition, UiEvent } from "@itwin/appui-abstract";
import { Point, SizeProps } from "@itwin/core-react";
import { KeyinEntry } from "../uiadmin/FrameworkUiAdmin";
/** Information maintained by PopupManager about a Popup
 * @public
 */
export interface PopupInfo {
    id: string;
    pt: XAndY;
    component: React.ReactNode;
    parentDocument: Document;
}
/** @public */
export interface PopupsChangedEventArgs {
    popups: ReadonlyArray<PopupInfo>;
}
/** Popups Changed Event class.
 * @public
 */
export declare class PopupsChangedEvent extends UiEvent<PopupsChangedEventArgs> {
}
/** Props for each popup managed by the PopupManager
 * @public
 */
export interface PopupPropsBase {
    id: string;
    el: HTMLElement;
    pt: XAndY;
    offset: XAndY;
}
/** Describes React based content
 * @public
 */
export interface ReactContent {
    reactNode: React.ReactNode;
}
/** Type for Popup Content
 * @public
 */
export declare type PopupContentType = HTMLElement | ReactContent;
/** ReactContent type guard.
 * @internal
 */
export declare const isReactContent: (content: PopupContentType) => content is ReactContent;
/** Popup Manager class
 * @public
 */
export declare class PopupManager {
    private static _popups;
    private static _editorId;
    private static _toolbarId;
    private static _htmlElementId;
    private static _cardId;
    private static _toolSettingsId;
    private static _keyPalettePopupId;
    private static _defaultOffset;
    static readonly onPopupsChangedEvent: PopupsChangedEvent;
    static get popupCount(): number;
    static get popups(): ReadonlyArray<PopupInfo>;
    static set popups(popups: ReadonlyArray<PopupInfo>);
    /** @internal */
    static clearPopups(): void;
    private static addPopup;
    private static updatePopup;
    static addOrUpdatePopup(popupInfo: PopupInfo): void;
    static removePopup(id: string): boolean;
    static get defaultOffset(): XAndY;
    static set defaultOffset(offset: XAndY);
    static showInputEditor(el: HTMLElement, pt: XAndY, value: Primitives.Value, propertyDescription: PropertyDescription, onCommit: OnValueCommitFunc, onCancel: OnCancelFunc): boolean;
    static hideInputEditor(): boolean;
    static showKeyinPalette(keyins: KeyinEntry[], el: HTMLElement, onItemExecuted?: OnItemExecutedFunc, onCancel?: OnCancelFunc): boolean;
    static hideKeyinPalette(): boolean;
    static showToolbar(toolbarProps: AbstractToolbarProps, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean;
    static hideToolbar(): boolean;
    static showHTMLElement(displayElement: HTMLElement, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean;
    static hideHTMLElement(): boolean;
    static showCard(content: PopupContentType, title: string | PropertyRecord | undefined, toolbarProps: AbstractToolbarProps | undefined, el: HTMLElement, pt: XAndY, offset: XAndY, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean;
    static hideCard(): boolean;
    static openToolSettings(dataProvider: DialogLayoutDataProvider, el: HTMLElement, pt: XAndY, offset: XAndY, onCancel: OnCancelFunc, relativePosition: RelativePosition): boolean;
    static closeToolSettings(): boolean;
    static getPopupPosition(el: HTMLElement, pt: XAndY, offset: XAndY, size: SizeProps): Point;
}
/** @internal */
interface PopupRendererState {
    parentDocument: Document | null;
    popups: ReadonlyArray<PopupInfo>;
}
/**  Popup Renderer
 * @public
 */
export declare class PopupRenderer extends React.Component<{}, PopupRendererState> {
    /** @internal */
    readonly state: PopupRendererState;
    componentDidMount(): void;
    componentWillUnmount(): void;
    private _handleRefSet;
    render(): React.ReactNode;
    private _handlePopupsChangedEvent;
}
export {};
//# sourceMappingURL=PopupManager.d.ts.map