/** @packageDocumentation
 * @module Frontstage
 */
/// <reference types="react" />
import "./Frontstage.scss";
import type { UiStateStorageResult } from "@itwin/core-react";
import { UiStateStorageStatus } from "@itwin/core-react";
import type { LayoutStore, NineZoneLabels, NineZoneState, PanelSide, TabState } from "@itwin/appui-layout-react";
import { type FrontstageDef } from "../frontstage/FrontstageDef";
import { StagePanelState } from "../stagepanels/StagePanelDef";
import type { WidgetDef } from "../widgets/WidgetDef";
import { StagePanelSection } from "../stagepanels/StagePanelSection";
import { StagePanelLocation } from "../stagepanels/StagePanelLocation";
/** @internal */
export declare function useLayoutStore(frontstageDef: FrontstageDef | undefined): LayoutStore;
/** 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 useNineZoneDispatch(frontstageDef: FrontstageDef): import("@itwin/appui-layout-react").NineZoneDispatch;
/** @internal */
export declare function WidgetPanelsFrontstage(): JSX.Element | null;
interface ActiveFrontstageDefProviderProps {
    layout: LayoutStore;
    frontstageDef: FrontstageDef;
}
/** @internal */
export declare function ActiveFrontstageDefProvider({ frontstageDef, layout, }: ActiveFrontstageDefProviderProps): JSX.Element;
/** @internal */
export declare function useLabels(): NineZoneLabels;
/** @internal */
export declare function addWidgets(state: NineZoneState, widgets: ReadonlyArray<WidgetDef>, side: PanelSide, widgetId: WidgetId): NineZoneState;
/** @internal */
export declare function appendWidgets(state: NineZoneState, widgetDefs: ReadonlyArray<WidgetDef>, location: StagePanelLocation, section: StagePanelSection): NineZoneState;
/** Adds frontstageDef widgets that are missing in NineZoneState.
 * @internal
 */
export declare function addMissingWidgets(frontstageDef: FrontstageDef, initialState: NineZoneState): NineZoneState;
type WidgetId = "leftStart" | "leftEnd" | "rightStart" | "rightEnd" | "topStart" | "topEnd" | "bottomStart" | "bottomEnd";
/** @internal */
export declare function getWidgetId(location: StagePanelLocation, section: StagePanelSection): WidgetId;
/** @internal */
export declare function getPanelSectionWidgets(frontstageDef: FrontstageDef, location: StagePanelLocation, section: StagePanelSection): ReadonlyArray<WidgetDef>;
/** @internal */
export declare function addPanelWidgets(state: NineZoneState, frontstageDef: FrontstageDef, location: StagePanelLocation): NineZoneState;
/** @internal */
export declare function isFrontstageStateSettingResult(settingsResult: UiStateStorageResult): settingsResult is {
    status: UiStateStorageStatus.Success;
    setting: WidgetPanelsFrontstageState;
};
/** @internal */
export declare function initializePanel(state: NineZoneState, frontstageDef: FrontstageDef, location: StagePanelLocation): NineZoneState;
/** @internal */
export declare const stateVersion = 17;
/** @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(panelState: StagePanelState | undefined): boolean;
/** FrontstageState is saved in UiStateStorage.
 * @internal
 */
export interface WidgetPanelsFrontstageState {
    nineZone: SavedNineZoneState;
    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;
}
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 showWidget(state: NineZoneState, id: TabState["id"]): NineZoneState;
/** @internal */
export declare function expandWidget(state: NineZoneState, id: TabState["id"]): NineZoneState;
/** @internal */
export declare function useSavedFrontstageState(frontstageDef: FrontstageDef): void;
/** @internal */
export declare function useSaveFrontstageSettings(frontstageDef: FrontstageDef, store: LayoutStore): 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