"use strict";
/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Widget
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.WidgetControl = void 0;
const ConfigurableUiControl_1 = require("../configurableui/ConfigurableUiControl");
/* eslint-disable deprecation/deprecation */
/** The base class for Widget controls.
 * @public
 * @deprecated in 4.16.0. Extends a deprecated class {@link ConfigurableUiControl}.
 */
class WidgetControl extends ConfigurableUiControl_1.ConfigurableUiControl {
    constructor(info, options) {
        super(info, options);
    }
    /** The ReactNode associated with this control */
    get reactNode() {
        return this._reactNode;
    }
    set reactNode(r) {
        this._reactNode = r;
    }
    /** The [[WidgetDef]] associated with this control */
    get widgetDef() {
        return this._widgetDef;
    }
    set widgetDef(w) {
        this._widgetDef = w;
    }
    /** Gets the type of ConfigurableUiControl, which is 'Widget' in this case */
    getType() {
        return ConfigurableUiControl_1.ConfigurableUiControlType.Widget;
    }
    /** Sets the [[WidgetState]] for this control */
    setWidgetState(state) {
        this.widgetDef.setWidgetState(state);
    }
    /** Called when widget state changes. */
    onWidgetStateChanged() { }
    /** Overwrite to save transient DOM state (i.e. scroll offset). */
    saveTransientState() { }
    /** Overwrite to restore transient DOM state.
     * @note Return true if the state is restored or the Widget will remount.
     */
    restoreTransientState() {
        return false;
    }
}
exports.WidgetControl = WidgetControl;
//# sourceMappingURL=WidgetControl.js.map