"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 StatusBar_1 = require("../statusbar/StatusBar");
const FrontstageDef_1 = require("../frontstage/FrontstageDef");
/** @internal */
function WidgetPanelsStatusBar(props) {
    const frontstageDef = (0, FrontstageDef_1.useActiveFrontstageDef)();
    const widgetDef = frontstageDef?.statusBar;
    if (!widgetDef)
        return null;
    const content = widgetDef.reactNode;
    const widgetControl = content === undefined
        ? widgetDef.getWidgetControl(ConfigurableUiControl_1.ConfigurableUiControlType.StatusBarWidget)
        : undefined;
    const className = (0, classnames_1.default)("uifw-widgetPanels-statusBar", props.className);
    return (React.createElement(StatusBar_1.StatusBar, { className: className, style: props.style, widgetControl: widgetControl }, widgetDef.reactNode));
}
exports.WidgetPanelsStatusBar = WidgetPanelsStatusBar;
//# sourceMappingURL=StatusBar.js.map