/*---------------------------------------------------------------------------------------------
 * 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 * as React from "react";
import { ConfigurableUiControlType } from "../configurableui/ConfigurableUiControl";
import { StatusBar } from "../statusbar/StatusBar";
import { useActiveFrontstageDef } from "../frontstage/FrontstageDef";
/** @internal */
// eslint-disable-next-line deprecation/deprecation
export function WidgetPanelsStatusBar(props) {
    const frontstageDef = useActiveFrontstageDef();
    const widgetDef = frontstageDef?.statusBar;
    if (!widgetDef)
        return null;
    const content = widgetDef.reactNode;
    const widgetControl = content === undefined
        ? // eslint-disable-next-line deprecation/deprecation
            widgetDef.getWidgetControl(
            // eslint-disable-next-line deprecation/deprecation
            ConfigurableUiControlType.StatusBarWidget
            // eslint-disable-next-line deprecation/deprecation
            )
        : undefined;
    return (
    // eslint-disable-next-line deprecation/deprecation
    React.createElement(StatusBar, { ...props, widgetControl: widgetControl }, content));
}
//# sourceMappingURL=StatusBar.js.map