/*---------------------------------------------------------------------------------------------
* 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 { StatusBarContext } from "../statusbar/StatusBar";
import { ConditionalField } from "./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.
 */
export function FooterModeField(props) {
    const { children, ...otherProps } = props;
    const statusBarContext = React.useContext(StatusBarContext);
    const conditionProps = { ...statusBarContext, ...otherProps };
    return (
    // eslint-disable-next-line deprecation/deprecation
    React.createElement(ConditionalField, { ...conditionProps, boolFunc: (innerProps) => innerProps.isInFooterMode }, (isInFooterMode) => isInFooterMode && children));
}
//# sourceMappingURL=FooterModeField.js.map