/** @packageDocumentation
 * @module Widget
 */
import type * as React from "react";
import type { BadgeType, ConditionalStringValue, PointProps, StringGetter } from "@itwin/appui-abstract";
import { UiEvent } from "@itwin/appui-abstract";
import type { FloatingWidgetState, PanelSide } from "@itwin/appui-layout-react";
import type { ConfigurableUiControlConstructor } from "../configurableui/ConfigurableUiControl";
import { ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl";
import type { WidgetControl } from "./WidgetControl";
import type { IconSpec, Rectangle, SizeProps } from "@itwin/core-react";
import type { WidgetConfig } from "./WidgetConfig";
import { WidgetState } from "./WidgetState";
import { StagePanelLocation } from "../stagepanels/StagePanelLocation";
/** Widget State Changed Event Args interface.
 * @public
 */
export interface WidgetStateChangedEventArgs {
    widgetDef: WidgetDef;
    widgetState: WidgetState;
}
/** Widget State Changed Event class.
 * @public
 */
export declare class WidgetStateChangedEvent extends UiEvent<WidgetStateChangedEventArgs> {
}
/** @internal */
export interface WidgetChangedEventArgs {
    widgetDef: WidgetDef;
}
/** @internal */
export interface WidgetEventArgs {
    widgetDef: WidgetDef;
}
/** Widget type enum.
 * @public
 */
export declare enum WidgetType {
    Tool = 0,
    Navigation = 1,
    Rectangular = 2,
    ToolSettings = 3,
    StatusBar = 4
}
/** @internal */
export interface TabLocation {
    widgetId: string;
    widgetIndex: number;
    side: PanelSide;
    tabIndex: number;
    floatingWidget?: FloatingWidgetState;
}
/** 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 _classId;
    private _priority;
    private _isFloatingStateSupported;
    private _isFloatingStateWindowResizable;
    private _stateChanged;
    private _widgetType;
    private _applicationData?;
    private _icon?;
    private _internalData?;
    private _badge?;
    private _onWidgetStateChanged?;
    private _saveTransientState?;
    private _restoreTransientState?;
    private _preferredPanelSize;
    private _defaultFloatingSize;
    private _canPopout?;
    private _floatingContainerId?;
    private _defaultFloatingPosition;
    private _hideWithUiWhenFloating?;
    private _allowedPanelTargets?;
    private _initialConfig?;
    private _tabLocation?;
    private _defaultTabLocation;
    private _popoutBounds?;
    get state(): WidgetState;
    get id(): string;
    get classId(): string | ConfigurableUiControlConstructor | undefined;
    get priority(): number;
    get isFloatingStateSupported(): boolean;
    get isFloatingStateWindowResizable(): boolean;
    get isToolSettings(): boolean;
    get isStatusBar(): boolean;
    get stateChanged(): boolean;
    get applicationData(): any | undefined;
    get isFloating(): boolean;
    get iconSpec(): IconSpec;
    set iconSpec(spec: IconSpec);
    get badgeType(): BadgeType | undefined;
    get initialConfig(): WidgetConfig | undefined;
    get widgetType(): WidgetType;
    set widgetType(type: WidgetType);
    /** @internal */
    get tabLocation(): TabLocation | undefined;
    set tabLocation(tabLocation: TabLocation | undefined);
    /** @internal */
    get defaultTabLocation(): TabLocation;
    /** @internal */
    get defaultFloatingPosition(): PointProps | undefined;
    set defaultFloatingPosition(position: PointProps | undefined);
    /** @internal */
    get defaultFloatingSize(): SizeProps | undefined;
    set defaultFloatingSize(size: SizeProps | undefined);
    /** @internal */
    get defaultState(): WidgetState;
    /** @internal */
    get popoutBounds(): Rectangle | undefined;
    set popoutBounds(bounds: Rectangle | undefined);
    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 v A string or a function to get the string.
     */
    setLabel(v: 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 widgetControl(): WidgetControl | undefined;
    getWidgetControl(type: ConfigurableUiControlType): WidgetControl | undefined;
    get reactNode(): React.ReactNode;
    set reactNode(node: React.ReactNode);
    setWidgetState(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.
     * I.e. opens the stage panel or brings the floating widget to front of the screen.
     * @public
     */
    show(): void;
    /** Opens the widget and expands it to fill full size of the stage panel.
     * @public
     */
    expand(): void;
}
//# sourceMappingURL=WidgetDef.d.ts.map