/*---------------------------------------------------------------------------------------------
 * 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 { Div } from "@itwin/core-react";
import * as React from "react";
import classnames from "classnames";
import { UiFramework } from "../UiFramework.js";
import { SafeAreaContext } from "../safearea/SafeAreaContext.js";
import { StatusBarField } from "./Field.js";
import { StatusBarPopup } from "./popup/Popup.js";
import "./StatusBar.scss";
import { SafeAreaInsetsHelpers } from "../layout/base/SafeAreaInsets.js";
import { DockedBar } from "../widget-panels/DockedBar.js";
/** Status Bar React component.
 * @public
 * @deprecated in 4.14.0. Use {@link StatusBarComposer} instead.
 */
export function StatusBar(props) {
    const safeAreaInsets = React.useContext(SafeAreaContext);
    const className = classnames("uifw-statusBar", safeAreaInsets && SafeAreaInsetsHelpers.getCssClassNames(safeAreaInsets), props.className);
    return (React.createElement(DockedBar, { placement: "bottom", className: className, style: props.style, onMouseEnter: UiFramework.visibility.handleWidgetMouseEnter },
        props.widgetControl?.getReactNode?.() ?? null,
        props.children));
}
/** StatusBar With Space Between Items React functional component
 * @public
 */
export function StatusBarSpaceBetween(props) {
    const { className, ...divProps } = props;
    return (React.createElement(Div, { ...divProps, mainClassName: className ? className : "uifw-statusBar-space-between" }));
}
/** StatusBar Left Section React functional component
 * @public
 */
export function StatusBarLeftSection(props) {
    const { className, ...divProps } = props;
    return (React.createElement(Div, { ...divProps, mainClassName: className ? className : "uifw-statusBar-left" }));
}
/** StatusBar Center Section React functional component
 * @public
 */
export function StatusBarCenterSection(props) {
    const { className, ...divProps } = props;
    return (React.createElement(Div, { ...divProps, mainClassName: className ? className : "uifw-statusBar-center" }));
}
/** StatusBar Right Section React functional component
 * @public
 */
export function StatusBarRightSection(props) {
    const { className, ...divProps } = props;
    return (React.createElement(Div, { ...divProps, mainClassName: className ? className : "uifw-statusBar-right" }));
}
/** Components used in a [[StatusBar]].
 * @public
 * @deprecated in 4.14.0. Please use components directly.
 */
(function (StatusBar) {
    /** Field of a [[StatusBar]].
     * @beta
     * @deprecated in 4.14.0. Use [iTwinUI Button](https://itwinui.bentley.com/docs/button) instead.
     */
    StatusBar.Field = StatusBarField;
    /** Popup of a [[StatusBar]].
     * @beta
     * @deprecated in 4.14.0. Use `StatusBarPopover` instead.
     */
    StatusBar.Popup = StatusBarPopup;
})(StatusBar || (StatusBar = {}));
//# sourceMappingURL=StatusBar.js.map