/*---------------------------------------------------------------------------------------------
* 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
 */
import "./StatusBar.scss";
import classnames from "classnames";
import * as React from "react";
import { ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl";
import { useActiveFrontstageDef } from "../frontstage/Frontstage";
import { StatusBar } from "../statusbar/StatusBar";
/** @internal */
export function WidgetPanelsStatusBar(props) {
    const frontstageDef = 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 = classnames("uifw-widgetPanels-statusBar", props.className);
    return (React.createElement(StatusBar, { className: className, style: props.style, isInFooterMode: true, widgetControl: widget === null || widget === void 0 ? void 0 : widget.getWidgetControl(ConfigurableUiControlType.StatusBarWidget) }));
}
//# sourceMappingURL=StatusBar.js.map