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