/** @packageDocumentation
 * @module Frontstage
 */
import type { ScreenViewport } from "@itwin/core-frontend";
import type { XAndY } from "@itwin/core-geometry";
import type { RectangleProps, SizeProps } from "@itwin/core-react";
import type { ChildWindow } from "../childwindow/ChildWindowConfig";
import { TimeTracker } from "../configurableui/TimeTracker";
import type { ContentControl } from "../content/ContentControl";
import type { ContentGroup } from "../content/ContentGroup";
import { ContentGroupProvider } from "../content/ContentGroup";
import type { ContentLayoutDef } from "../content/ContentLayout";
import type { NineZoneDispatch } from "../layout/base/NineZone";
import type { NineZoneState } from "../layout/state/NineZoneState";
import { StagePanelDef } from "../stagepanels/StagePanelDef";
import { StagePanelLocation } from "../stagepanels/StagePanelLocation";
import { WidgetDef } from "../widgets/WidgetDef";
import type { FrontstageProvider } from "./FrontstageProvider";
import type { Frontstage } from "./Frontstage";
/** @internal */
export interface FrontstageEventArgs {
    frontstageDef: FrontstageDef;
}
/** @internal */
export interface FrontstageNineZoneStateChangedEventArgs extends FrontstageEventArgs {
    state: NineZoneState | undefined;
}
/** FrontstageDef class provides an API for a Frontstage.
 * @public
 */
export declare class FrontstageDef {
    private _id;
    private _initialConfig?;
    private _isStageClosing;
    private _isReady;
    private _isApplicationClosing;
    private _usage?;
    private _version;
    private _toolSettings?;
    private _statusBar?;
    private _contentManipulation?;
    private _viewNavigation?;
    private _topPanel?;
    private _leftPanel?;
    private _rightPanel?;
    private _bottomPanel?;
    private _contentLayoutDef?;
    private _contentGroup?;
    private _frontstageProvider?;
    private _timeTracker;
    private _nineZoneState?;
    private _contentGroupProvider?;
    private _floatingContentControls?;
    private _toolAdminDefaultToolId?;
    private _dispatch?;
    private _batching;
    get id(): string;
    get usage(): string;
    get version(): number;
    get contentGroupProvider(): ContentGroupProvider | undefined;
    get floatingContentControls(): ContentControl[] | undefined;
    get toolSettings(): WidgetDef | undefined;
    get statusBar(): WidgetDef | undefined;
    get contentManipulation(): WidgetDef | undefined;
    get viewNavigation(): WidgetDef | undefined;
    get topPanel(): StagePanelDef | undefined;
    get leftPanel(): StagePanelDef | undefined;
    get rightPanel(): StagePanelDef | undefined;
    get bottomPanel(): StagePanelDef | undefined;
    get contentLayoutDef(): ContentLayoutDef | undefined;
    get contentGroup(): ContentGroup | undefined;
    /** @deprecated in 4.15.0. Use {@link FrontstageDef.id} to look up a frontstage. */
    get frontstageProvider(): FrontstageProvider | undefined;
    private toStagePanelLocation;
    private populateStateMaps;
    private triggerStateChangeEvents;
    private handlePopouts;
    /** @internal */
    get nineZoneState(): NineZoneState | undefined;
    set nineZoneState(state: NineZoneState | undefined);
    /** @internal */
    get dispatch(): NineZoneDispatch;
    set dispatch(dispatch: NineZoneDispatch);
    /** Dispatch multiple actions inside `fn`, but trigger events once.
     * @internal
     */
    batch(fn: () => void): void;
    /** @internal */
    get timeTracker(): TimeTracker;
    /** Creates a [[FrontstageDef]] and initializes it. */
    static create(providerOrFrontstage: FrontstageProvider | Frontstage): Promise<FrontstageDef>;
    /** Handles when the Frontstage becomes activated */
    protected _onActivated(): Promise<void>;
    /** Handles when the Frontstage becomes activated */
    onActivated(): Promise<void>;
    /** Handles when the Frontstage becomes inactive */
    protected _onDeactivated(): Promise<void>;
    /** Handles when the Frontstage becomes inactive */
    onDeactivated(): Promise<void>;
    /** @internal */
    setIsApplicationClosing(value: boolean): void;
    /** Returns once the contained widgets and content controls are ready to use */
    waitUntilReady(): Promise<void>;
    /** Handles when the Frontstage becomes active */
    protected _onFrontstageReady(): void;
    /** Handles when the Frontstage becomes active */
    onFrontstageReady(): void;
    /** Sets the Content Layout and Content Group */
    setContentLayoutAndGroup(contentLayoutDef: ContentLayoutDef, contentGroup: ContentGroup): void;
    /** Sets the active view content control to the default or first */
    setActiveContent(): Promise<boolean>;
    /** Sets the active view content control */
    setActiveView(newContent: ContentControl, oldContent?: ContentControl): void;
    /** Sets the active view content control based on the selected viewport. */
    setActiveViewFromViewport(viewport: ScreenViewport): boolean;
    /** Gets a [[StagePanelDef]] based on a given panel location
     * @beta
     */
    getStagePanelDef(location: StagePanelLocation): StagePanelDef | undefined;
    /** Gets a list of [[StagePanelDef]]s
     * @beta
     */
    get panelDefs(): StagePanelDef[];
    /** Finds a [[WidgetDef]] based on a given id */
    findWidgetDef(id: string): WidgetDef | undefined;
    /** Gets the list of [[WidgetControl]]s */
    private get _widgetControls();
    addFloatingContentControl(contentControl?: ContentControl): void;
    dropFloatingContentControl(contentControl?: ContentControl): void;
    /** Gets the list of [[ContentControl]]s */
    get contentControls(): ContentControl[];
    /** Initializes a FrontstageDef from frontstage.
     * @internal
     */
    initializeFromConfig(config: Frontstage): Promise<void>;
    /** @internal */
    updateWidgetDefs(): void;
    /** Restores frontstage layout to initial configuration.
     * @beta
     */
    restoreLayout(): void;
    isPopoutWidget(widgetId: string): boolean;
    isFloatingWidget(widgetId: string): boolean;
    /** Create a new floating panel that contains the widget specified by its Id.
     * @param widgetId case sensitive Widget Id
     * @param position Position of top left corner of floating panel in pixels. If undefined {x:50, y:100} is used.
     * @param size defines the width and height of the floating panel. If undefined and widget has been floated before
     * the previous size is used, else {height:400, width:400} is used.
     * @beta
     */
    floatWidget(widgetId: string, position?: XAndY, size?: SizeProps): void;
    /** Check widget and panel state to determine whether the widget is currently displayed
     * @param widgetId case-sensitive Widget Id
     * @public
     */
    isWidgetDisplayed(widgetId: string): boolean;
    /** Opens window for specified PopoutWidget container. Used to reopen popout when running in Electron.
     * @internal
     */
    openPopoutWidgetContainer(widgetContainerId: string, oldState: NineZoneState | undefined): boolean;
    /** Create a new popout/child window that contains the widget specified by its Id.
     * @param widgetId case sensitive Widget Id
     * @param position Position of top left corner of floating panel in pixels. If undefined {x:0, y:0} is used.
     * @param size defines the width and height of the floating panel. If undefined and widget has been floated before
     * the previous size is used, else {height:800, width:600} is used.
     * @beta
     */
    popoutWidget(widgetId: string, position?: XAndY, size?: SizeProps): void;
    get isStageClosing(): boolean;
    get isApplicationClosing(): boolean;
    get isReady(): boolean;
    /** @internal */
    saveChildWindowSizeAndPosition(childWindowId: string, childWindow: ChildWindow): void;
    /** @internal */
    dockWidgetContainerByContainerId(widgetContainerId: string): void;
    /** Finds the container with the specified widget and re-docks all widgets
     * back to the panel zone location that was used when the floating container
     * was generated.
     * @param widgetId  case sensitive Widget Id.
     * @beta
     */
    dockWidgetContainer(widgetId: string): void;
    setFloatingWidgetContainerBounds(floatingWidgetId: string, bounds: RectangleProps): boolean;
    getFloatingWidgetContainerIds(): string[];
    getFloatingWidgetContainerIdByWidgetId(widgetId: string): string | undefined;
    getFloatingWidgetContainerBounds(floatingWidgetId: string | undefined): RectangleProps | undefined;
    private _widgetDefs;
    /** Iterable of all widget definitions in a frontstage.
     * @internal
     */
    get widgetDefs(): {
        [Symbol.iterator](): Iterator<WidgetDef, any, undefined>;
    };
}
/** Hook that returns active frontstage id.
 * @public
 */
export declare const useActiveFrontstageId: () => string;
/** Hook to return the active Frontstage def.
 * @public
 */
export declare function useActiveFrontstageDef(): FrontstageDef | undefined;
/** Hook that returns the widgetDef for a specific widgetId within the active frontstage.
 * @public
 */
export declare function useSpecificWidgetDef(widgetId: string): WidgetDef | undefined;
//# sourceMappingURL=FrontstageDef.d.ts.map