/** @packageDocumentation
 * @module ChildWindowManager
 */
import type * as React from "react";
import { BeEvent } from "@itwin/core-bentley";
import type { ChildWindowLocationProps, FrameworkChildWindows, OpenChildWindowInfo } from "../framework/FrameworkChildWindows.js";
import type { TabState } from "../layout/state/TabState.js";
/** @internal */
export interface InternalOpenChildWindowInfo extends OpenChildWindowInfo {
    content?: React.ReactNode;
    tabId?: TabState["id"];
}
interface OpenWindowArgs {
    childWindowId: string;
    title: string;
    content: React.ReactNode;
    location: ChildWindowLocationProps;
    useDefaultPopoutUrl: boolean;
    tabId?: TabState["id"];
}
/** Supports opening a child browser window from the main application window. The child window is managed by the main application
 * and is running in the same security context. The application must deliver the html file iTwinPopup.html along side its index.html.
 * See also: [Child Window Manager]($docs/learning/ui/appui-react/ChildWindows.md)
 * @internal
 */
export declare class InternalChildWindowManager implements FrameworkChildWindows {
    private _openChildWindows;
    private _childWindowToUnregister;
    readonly onChildWindowsChanged: BeEvent<() => void>;
    get openChildWindows(): InternalOpenChildWindowInfo[];
    /**
     * Returns the OpenChildWindowInfo for the related id.
     * @param childWindowId Id of the window to retrieve.
     * @returns undefined if not found.
     */
    find(childWindowId: string | undefined): OpenChildWindowInfo | undefined;
    /**
     * Return the childWindowId of the provided window.
     * @param contentWindow Window element to identify
     * @returns undefined if not found
     */
    findId(contentWindow: Window | undefined | null): string | undefined;
    private renderChildWindowContents;
    /** Close all child/pop-out windows. This typically is called when the frontstage is changed. */
    closeAll(): void;
    /**
     * Close a specific child window.
     * @param childWindowId Id of the window to close.
     * @param processWindowClose should the `close` method be called on the closing window. (defaults to true).
     * @returns false if the window could not be found.
     */
    close: (childWindowId: string, processWindowClose?: boolean) => boolean;
    private adjustWindowLocation;
    /**
     * Open a new child window.
     * @param childWindowId Id to assign to the newly created window.
     * @param title Title to display on the window.
     * @param content ReactNode to be rendered in the window.
     * @param location Position and size information
     * @param useDefaultPopoutUrl use "/iTwinPopup.html" as the window Url, "" otherwise.
     * @returns true if the window is opened successfully.
     */
    open(childWindowId: string, title: string, content: React.ReactNode, location: ChildWindowLocationProps, useDefaultPopoutUrl?: boolean): boolean;
    /** Used internally to open child windows and popout widgets. */
    openWindow({ childWindowId, location, useDefaultPopoutUrl, content, title, tabId, }: OpenWindowArgs): Window | undefined;
}
export {};
//# sourceMappingURL=InternalChildWindowManager.d.ts.map