"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.StatusBarRightSection = exports.StatusBarCenterSection = exports.StatusBarLeftSection = exports.StatusBarSpaceBetween = exports.StatusBar = void 0;
require("./StatusBar.scss");
const React = require("react");
const core_react_1 = require("@itwin/core-react");
const appui_layout_react_1 = require("@itwin/appui-layout-react");
const SafeAreaContext_1 = require("../safearea/SafeAreaContext");
const SafeAreaHelpers_1 = require("../safearea/SafeAreaHelpers");
const UiFramework_1 = require("../UiFramework");
const Field_1 = require("./Field");
const Popup_1 = require("./Popup");
/** Status Bar React component.
 * @public
 */
class StatusBar extends React.Component {
    render() {
        return (React.createElement(SafeAreaContext_1.SafeAreaContext.Consumer, null, (safeAreaInsets) => {
            var _a, _b, _c;
            return (React.createElement(appui_layout_react_1.Footer, { className: this.props.className, onMouseEnter: UiFramework_1.UiFramework.visibility.handleWidgetMouseEnter, safeAreaInsets: (0, SafeAreaHelpers_1.toLayoutSafeAreaInsets)(safeAreaInsets), style: this.props.style }, (_c = (_b = (_a = this.props.widgetControl) === null || _a === void 0 ? void 0 : _a.getReactNode) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : null,
                this.props.children));
        }));
    }
}
exports.StatusBar = StatusBar;
/** StatusBar With Space Between Items React functional component
 * @public
 */
function StatusBarSpaceBetween(props) {
    const { className, ...divProps } = props;
    return (React.createElement(core_react_1.Div, { ...divProps, mainClassName: className ? className : "uifw-statusbar-space-between" }));
}
exports.StatusBarSpaceBetween = StatusBarSpaceBetween;
/** StatusBar Left Section React functional component
 * @public
 */
function StatusBarLeftSection(props) {
    const { className, ...divProps } = props;
    return (React.createElement(core_react_1.Div, { ...divProps, mainClassName: className ? className : "uifw-statusbar-left" }));
}
exports.StatusBarLeftSection = StatusBarLeftSection;
/** StatusBar Center Section React functional component
 * @public
 */
function StatusBarCenterSection(props) {
    const { className, ...divProps } = props;
    return (React.createElement(core_react_1.Div, { ...divProps, mainClassName: className ? className : "uifw-statusbar-center" }));
}
exports.StatusBarCenterSection = StatusBarCenterSection;
/** StatusBar Right Section React functional component
 * @public
 */
function StatusBarRightSection(props) {
    const { className, ...divProps } = props;
    return (React.createElement(core_react_1.Div, { ...divProps, mainClassName: className ? className : "uifw-statusbar-right" }));
}
exports.StatusBarRightSection = StatusBarRightSection;
/** Components used in a [[StatusBar]].
 * @public
 */
(function (StatusBar) {
    /** Field of a [[StatusBar]].
     * @beta
     */
    StatusBar.Field = Field_1.StatusBarField;
    /** Popup of a [[StatusBar]].
     * @beta
     */
    StatusBar.Popup = Popup_1.StatusBarPopup;
})(StatusBar = exports.StatusBar || (exports.StatusBar = {}));
//# sourceMappingURL=StatusBar.js.map