/** @packageDocumentation
 * @module Widget
 */
import type * as React from "react";
import type { ConditionalStringValue, StringGetter } from "@itwin/appui-abstract";
import { UiEvent } from "@itwin/appui-abstract";
import type { XAndY } from "@itwin/core-geometry";
import type { ConfigurableUiControlConstructor } from "../configurableui/ConfigurableUiControl.js";
import { ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl.js";
import type { WidgetControl } from "./WidgetControl.js";
import type { BadgeType, IconSpec } from "@itwin/core-react";
import type { BadgeKind } from "@itwin/core-react/internal";
import type { WidgetConfig } from "./WidgetConfig.js";
import { WidgetState } from "./WidgetState.js";
import { StagePanelLocation } from "../stagepanels/StagePanelLocation.js";
import type { NineZoneState } from "../layout/state/NineZoneState.js";
import type { SizeProps } from "../utils/SizeProps.js";
/** Widget State Changed Event Args interface.
 * @public
 * @deprecated in 4.13.0. Event args are inferred from a listener. If explicit type is needed use a type helper.
 */
export interface WidgetStateChangedEventArgs {
    widgetDef: WidgetDef;
    widgetState: WidgetState;
}
/** Widget State Changed Event class.
 * @public
 * @deprecated in 4.13.0. This class should not be used by applications to instantiate objects.
 */
export declare class WidgetStateChangedEvent extends UiEvent<WidgetStateChangedEventArgs> {
}
/** Widget type enum.
 * @public
 */
export declare enum WidgetType {
    Tool = 0,
    Navigation = 1,
    Rectangular = 2,
    ToolSettings = 3,
    StatusBar = 4
}
/** A Widget Definition in the 9-Zone Layout system.
 * @public
 */
export declare class WidgetDef {
    private static _sId;
    private _label;
    private _tooltip;
    private _widgetReactNode;
    private _widgetControl;
    private _defaultState;
    private _id;
    private _priority;
    private _stateChanged;
    private _widgetType;
    private _applicationData?;
    private _iconSpec?;
    private _internalData?;
    private _badge?;
    private _badgeKind?;
    private _saveTransientState?;
    private _restoreTransientState?;
    private _preferredPanelSize;
    private _defaultFloatingSize;
    private _canPopout?;
    private _floatingContainerId?;
    private _defaultFloatingPosition;
    private _hideWithUiWhenFloating?;
    private _allowedPanelTargets?;
    private _initialConfig?;
    get state(): WidgetState;
    get id(): string;
    get priority(): number;
    get isFloatingStateSupported(): boolean;
    get isFloatingStateWindowResizable(): boolean;
    get isToolSettings(): boolean;
    get isStatusBar(): boolean;
    get stateChanged(): boolean;
    get applicationData(): any;
    get isFloating(): boolean;
    /** @deprecated in 4.16.0. Use {@link Widget.iconNode} instead. */
    get iconSpec(): IconSpec;
    set iconSpec(spec: IconSpec);
    /** @deprecated in 4.16.0. Use `badgeKind` instead. */
    get badgeType(): BadgeType | undefined;
    get badgeKind(): BadgeKind | undefined;
    get initialConfig(): WidgetConfig | undefined;
    get widgetType(): WidgetType;
    set widgetType(type: WidgetType);
    /** @internal */
    get defaultFloatingPosition(): XAndY | undefined;
    set defaultFloatingPosition(position: XAndY | undefined);
    /** @internal */
    get defaultFloatingSize(): SizeProps | undefined;
    set defaultFloatingSize(size: SizeProps | undefined);
    get defaultState(): WidgetState;
    constructor();
    /** @internal */
    static create(config: WidgetConfig, type?: WidgetType): WidgetDef;
    private initializeFromConfig;
    /** @alpha */
    get preferredPanelSize(): "fit-content" | undefined;
    /** Get the label string */
    get label(): string;
    /** Set the label.
     * @param labelSpec A string or a function to get the string.
     */
    setLabel(labelSpec: string | ConditionalStringValue | StringGetter): void;
    /** Get the tooltip string */
    get tooltip(): string;
    /** Set the tooltip.
     * @param v A string or a function to get the string.
     */
    setTooltip(v: string | ConditionalStringValue | StringGetter): void;
    get reactNode(): React.ReactNode;
    set reactNode(node: React.ReactNode);
    setWidgetState(newState: WidgetState): void;
    /** @internal */
    handleWidgetStateChanged(newState: WidgetState): void;
    setCanPopout(value: boolean | undefined): void;
    get canPopout(): boolean | undefined;
    setFloatingContainerId(value: string | undefined): void;
    get floatingContainerId(): string | undefined;
    canOpen(): boolean;
    get isVisible(): boolean;
    get activeState(): WidgetState;
    get isActive(): boolean;
    set hideWithUiWhenFloating(hide: boolean | undefined);
    get hideWithUiWhenFloating(): boolean;
    get allowedPanelTargets(): ReadonlyArray<StagePanelLocation> | undefined;
    set allowedPanelTargets(targets: ReadonlyArray<StagePanelLocation> | undefined);
    onWidgetStateChanged(): void;
    /** Overwrite to save transient DOM state (i.e. scroll offset). */
    saveTransientState(): void;
    /** Overwrite to restore transient DOM state.
     * @note Return true if the state is restored or the Widget will remount.
     */
    restoreTransientState(): boolean;
    /** Opens the widget and makes it visible to the user.
     * @note Opens the stage panel if needed.
     * @note Brings the floating widget to the front.
     * @note Brings the window of the popout widget to the front (if allowed by the browser).
     * @public
     */
    show(): void;
    /** Opens the widget and expands it to fill full size of the stage panel.
     * @public
     */
    expand(): void;
    /** @deprecated in 4.16.0. Uses a deprecated type {@link ConfigurableUiControlConstructor}. */
    get classId(): string | ConfigurableUiControlConstructor | undefined;
    /** @deprecated in 4.16.0. Returns an instance of a deprecated type {@link WidgetControl}. */
    get widgetControl(): WidgetControl | undefined;
    /** @deprecated in 4.16.0. Returns an instance of a deprecated type {@link WidgetControl}. */
    getWidgetControl(type: ConfigurableUiControlType): WidgetControl | undefined;
}
/** @internal */
export declare function getWidgetState(widgetId: WidgetDef["id"], nineZone: NineZoneState): WidgetState;
//# sourceMappingURL=WidgetDef.d.ts.map