"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 StatusBar
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.WidgetPanelsStatusBar = void 0;
require("./StatusBar.scss");
const classnames_1 = require("classnames");
const React = require("react");
const ConfigurableUiControl_1 = require("../configurableui/ConfigurableUiControl");
const Frontstage_1 = require("../frontstage/Frontstage");
const StatusBar_1 = require("../statusbar/StatusBar");
/** @internal */
function WidgetPanelsStatusBar(props) {
    const frontstageDef = (0, Frontstage_1.useActiveFrontstageDef)();
    const zone = frontstageDef === null || frontstageDef === void 0 ? void 0 : frontstageDef.bottomCenter; // eslint-disable-line deprecation/deprecation
    let widget = frontstageDef === null || frontstageDef === void 0 ? void 0 : frontstageDef.statusBar;
    if (zone && zone.isStatusBar) {
        widget = zone.getSingleWidgetDef();
    }
    if (!widget)
        return null;
    const className = (0, classnames_1.default)("uifw-widgetPanels-statusBar", props.className);
    return (React.createElement(StatusBar_1.StatusBar, { className: className, style: props.style, isInFooterMode: true, widgetControl: widget === null || widget === void 0 ? void 0 : widget.getWidgetControl(ConfigurableUiControl_1.ConfigurableUiControlType.StatusBarWidget) }));
}
exports.WidgetPanelsStatusBar = WidgetPanelsStatusBar;
//# sourceMappingURL=StatusBar.js.map