"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.FooterModeField = void 0;
const React = require("react");
const StatusBar_1 = require("../statusbar/StatusBar");
const ConditionalField_1 = require("./ConditionalField");
/**
 * A component that renders its children if the StatusBar is in Footer mode.
 * @public
 * @deprecated in 3.3. In upcoming version, widget mode will be removed, in footer mode will always be true, making this component useless.
 */
function FooterModeField(props) {
    const { children, ...otherProps } = props;
    const statusBarContext = React.useContext(StatusBar_1.StatusBarContext);
    const conditionProps = { ...statusBarContext, ...otherProps };
    return (
    // eslint-disable-next-line deprecation/deprecation
    React.createElement(ConditionalField_1.ConditionalField, { ...conditionProps, boolFunc: (innerProps) => innerProps.isInFooterMode }, (isInFooterMode) => isInFooterMode && children));
}
exports.FooterModeField = FooterModeField;
//# sourceMappingURL=FooterModeField.js.map