/** @packageDocumentation
 * @module Frontstage
 */
import "./Frontstage.scss";
import * as React from "react";
import { WidgetState } from "@itwin/appui-abstract";
import { RectangleProps, UiStateStorageResult, UiStateStorageStatus } from "@itwin/core-react";
import { NineZoneAction, NineZoneDispatch, NineZoneLabels, NineZoneState, PanelSide, TabState } from "@itwin/appui-layout-react";
import { FrontstageDef } from "../frontstage/FrontstageDef";
import { StagePanelState, StagePanelZoneDefKeys } from "../stagepanels/StagePanelDef";
import { TabLocation, WidgetDef } from "../widgets/WidgetDef";
import { ZoneState } from "../zones/ZoneDef";
/** @internal */
export declare function useNineZoneState(frontstageDef: FrontstageDef): NineZoneState | undefined;
/** Update in-memory NineZoneState of newly activated frontstage with up to date size.
 * @internal
 */
export declare function useUpdateNineZoneSize(frontstageDef: FrontstageDef): void;
/** @internal */
export declare function FrameworkStateReducer(state: NineZoneState, action: NineZoneAction, frontstageDef: FrontstageDef): NineZoneState;
/** @internal */
export declare function useNineZoneDispatch(frontstageDef: FrontstageDef): NineZoneDispatch;
/** @internal */
export declare const WidgetPanelsFrontstage: React.NamedExoticComponent<object>;
/** @internal */
export declare function ActiveFrontstageDefProvider({ frontstageDef }: {
    frontstageDef: FrontstageDef;
}): JSX.Element;
/** @internal */
export declare function useLabels(): NineZoneLabels;
/** @internal */
export declare function addWidgets(state: NineZoneState, widgets: ReadonlyArray<WidgetDef>, side: PanelSide, widgetId: WidgetIdTypes): NineZoneState;
/** @internal */
export declare function appendWidgets(state: NineZoneState, widgetDefs: ReadonlyArray<WidgetDef>, side: PanelSide, preferredWidgetIndex: number): NineZoneState;
/** Adds frontstageDef widgets that are missing in NineZoneState.
 * @internal
 */
export declare function addMissingWidgets(frontstageDef: FrontstageDef, initialState: NineZoneState): NineZoneState;
/** Removes NineZoneState widgets that are missing in frontstageDef.
 * @internal
 */
export declare function removeMissingWidgets(frontstageDef: FrontstageDef, initialState: NineZoneState): NineZoneState;
declare type WidgetIdTypes = "leftStart" | "leftEnd" | "rightStart" | "rightEnd" | "topStart" | "topEnd" | "bottomStart" | "bottomEnd";
/** @internal */
export declare function getWidgetId(side: PanelSide, key: StagePanelZoneDefKeys): WidgetIdTypes;
/** @internal */
export declare function getPanelZoneWidgets(frontstageDef: FrontstageDef, panelZone: WidgetIdTypes): WidgetDef[];
/** @internal */
export declare function addPanelWidgets(state: NineZoneState, frontstageDef: FrontstageDef, side: PanelSide): NineZoneState;
/** @internal */
export declare function isFrontstageStateSettingResult(settingsResult: UiStateStorageResult): settingsResult is {
    status: UiStateStorageStatus.Success;
    setting: WidgetPanelsFrontstageState;
};
/** @internal */
export declare function initializePanel(state: NineZoneState, frontstageDef: FrontstageDef, panelSide: PanelSide): NineZoneState;
/** @internal */
export declare function initializeNineZoneState(frontstageDef: FrontstageDef): NineZoneState;
/** Converts from saved NineZoneState to NineZoneState.
 * @note Restores toolSettings tab.
 * @note Restores tab labels.
 * @internal
 */
export declare function restoreNineZoneState(frontstageDef: FrontstageDef, saved: SavedNineZoneState): NineZoneState;
/** Prepares NineZoneState to be saved.
 * @note Removes toolSettings tab.
 * @note Removes tab labels and iconSpec.
 * @internal
 */
export declare function packNineZoneState(state: NineZoneState): SavedNineZoneState;
/** @internal */
export declare function isPanelCollapsed(zoneStates: ReadonlyArray<ZoneState | undefined>, panelStates: ReadonlyArray<StagePanelState | undefined>): boolean;
/** FrontstageState is saved in UiStateStorage.
 * @internal
 */
export interface WidgetPanelsFrontstageState {
    nineZone: SavedNineZoneState;
    widgets: SavedWidgets;
    id: FrontstageDef["id"];
    /** Frontstage version used to create the frontstage state. Allows to invalidate the layout from the frontstage. */
    version: number;
    /** Platform provided frontstage version. Allows to invalidate the layout from the platform. */
    stateVersion: number;
}
/** Saved data specific to `WidgetDef`. I.e. used to restore hidden widgets.
 * @internal
 */
export interface SavedWidget {
    readonly id: WidgetDef["id"];
    readonly tabLocation?: TabLocation;
    readonly popoutBounds?: RectangleProps;
}
/** @internal */
export declare type SavedWidgets = ReadonlyArray<SavedWidget>;
declare type SavedTabState = Omit<TabState, "label" | "canPopout" | "isFloatingStateWindowResizable" | "iconSpec">;
interface SavedTabsState {
    readonly [id: string]: SavedTabState;
}
interface SavedNineZoneState extends Omit<NineZoneState, "tabs"> {
    readonly tabs: SavedTabsState;
}
/** @internal */
export declare function setWidgetState(state: NineZoneState, widgetDef: WidgetDef, widgetState: WidgetState): NineZoneState;
/** @internal */
export declare function showWidget(state: NineZoneState, id: TabState["id"]): NineZoneState;
/** @internal */
export declare function expandWidget(state: NineZoneState, id: TabState["id"]): NineZoneState;
/** @internal */
export declare function setWidgetLabel(state: NineZoneState, id: TabState["id"], label: string): NineZoneState;
/** @internal */
export declare function useSavedFrontstageState(frontstageDef: FrontstageDef): void;
/** @internal */
export declare function useSaveFrontstageSettings(frontstageDef: FrontstageDef): void;
/** @internal */
export declare const FRONTSTAGE_SETTINGS_NAMESPACE = "uifw-frontstageSettings";
/** @internal */
export declare function getFrontstageStateSettingName(frontstageId: WidgetPanelsFrontstageState["id"]): string;
/** @internal */
export declare function useFrontstageManager(frontstageDef: FrontstageDef, useToolAsToolSettingsLabel?: boolean): void;
/** @internal */
export declare function useItemsManager(frontstageDef: FrontstageDef): void;
export {};
//# sourceMappingURL=Frontstage.d.ts.map