/** @packageDocumentation
 * @module Widget
 */
import * as React from "react";
import { AbstractWidgetProps, BadgeType, ConditionalStringValue, PointProps, StringGetter, UiEvent, WidgetState } from "@itwin/appui-abstract";
import { Direction, FloatingWidgetState, PanelSide } from "@itwin/appui-layout-react";
import { ConfigurableUiControlConstructor, ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl";
import { CommandItemDef } from "../shared/CommandItemDef";
import { ItemList } from "../shared/ItemMap";
import { WidgetControl } from "./WidgetControl";
import { WidgetProps } from "./WidgetProps";
import { IconSpec, Rectangle, SizeProps } from "@itwin/core-react";
/** 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,
    /** @deprecated in 3.6. UI 1.0 will be removed in AppUi 4.0 */
    FreeFrom = 2,
    Rectangular = 3,
    ToolSettings = 4,
    StatusBar = 5
}
/** Properties for a Toolbar Widget.
 * @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0.
 * @public
 */
export interface ToolbarWidgetProps extends WidgetProps {
    horizontalDirection?: Direction;
    verticalDirection?: Direction;
    horizontalItems?: ItemList;
    verticalItems?: ItemList;
}
/** Properties for a Tool Widget.
 * @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0
 * @public
 */
export interface ToolWidgetProps extends ToolbarWidgetProps {
    appButton?: CommandItemDef;
}
/** Properties for a Navigation Widget.
 * @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0
 * @public
 */
export interface NavigationWidgetProps extends ToolbarWidgetProps {
    navigationAidId?: string;
}
/** Union of all Widget properties.
 * @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0
 * @public
 */
export declare type AnyWidgetProps = WidgetProps | ToolWidgetProps | NavigationWidgetProps;
/** Prototype for WidgetDef StateFunc (UI 1.0 only deprecate ???)
 * @deprecated in 3.5. Used in UI1.0 only.
 * @public
 */
export declare type WidgetStateFunc = (state: Readonly<WidgetState>) => WidgetState;
/** @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 _state;
    private _id;
    private _classId;
    private _priority;
    private _isFreeform;
    private _isFloatingStateSupported;
    private _isFloatingStateWindowResizable;
    private _isToolSettings;
    private _isStatusBar;
    private _stateChanged;
    private _fillZone;
    private _syncEventIds;
    private _stateFunc?;
    private _widgetType;
    private _applicationData?;
    private _iconSpec?;
    private _internalData?;
    private _badgeType?;
    private _onWidgetStateChanged?;
    private _saveTransientState?;
    private _restoreTransientState?;
    private _preferredPanelSize;
    private _defaultFloatingSize;
    private _canPopout?;
    private _floatingContainerId?;
    private _defaultFloatingPosition;
    private _hideWithUiWhenFloating?;
    private _allowedPanelTargets?;
    private _initialProps?;
    private _tabLocation?;
    private _defaultTabLocation;
    private _popoutBounds?;
    get state(): WidgetState;
    get id(): string;
    get classId(): string | ConfigurableUiControlConstructor | undefined;
    get priority(): number;
    /** @deprecated in 3.6. UI 1.0 will be removed in AppUi 4.0*/
    get isFreeform(): boolean;
    get isFloatingStateSupported(): boolean;
    get isFloatingStateWindowResizable(): boolean;
    get isToolSettings(): boolean;
    get isStatusBar(): boolean;
    get stateChanged(): boolean;
    /** @deprecated in 3.6. UI1.0 is deprecated. */
    get fillZone(): boolean;
    /** @deprecated in 3.6. UI 1.0 will be removed in AppUi 4.0*/
    get syncEventIds(): string[];
    /** @deprecated in 3.6. UI 1.0 will be removed in AppUi 4.0*/
    get stateFunc(): WidgetStateFunc | undefined;
    get applicationData(): any | undefined;
    get isFloating(): boolean;
    get iconSpec(): IconSpec;
    set iconSpec(spec: IconSpec);
    get badgeType(): BadgeType | undefined;
    get initialProps(): WidgetProps | 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();
    /** @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0 */
    constructor(props: WidgetProps);
    /** @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0 */
    static initializeFromWidgetProps(widgetProps: WidgetProps, me: WidgetDef): void;
    /** @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0 */
    static createWidgetPropsFromAbstractProps(abstractWidgetProps: AbstractWidgetProps): WidgetProps;
    /** @deprecated in 3.5. UI 1.0 will be removed in AppUi 4.0 */
    setUpSyncSupport(props: WidgetProps): void;
    private _handleSyncUiEvent;
    /** @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<"left" | "right" | "bottom" | "top"> | undefined;
    set allowedPanelTargets(targets: ReadonlyArray<"left" | "right" | "bottom" | "top"> | 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.
     * @alpha
     */
    show(): void;
    /** Opens the widget and expands it to fill full size of the stage panel.
     * @alpha
     */
    expand(): void;
}
//# sourceMappingURL=WidgetDef.d.ts.map