/*---------------------------------------------------------------------------------------------
* 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";
/** HOC that injects values for [[MessageCenterFieldProps]].
 * @public @deprecated in 3.3. Use `MessageManager.registerAnimateOutToElement` to register this ref in the related component.
 */
export const withMessageCenterFieldProps = (
// eslint-disable-next-line @typescript-eslint/naming-convention
Component) => {
    return function WithMessageCenterFieldProps(props) {
        const statusBarContext = React.useContext(StatusBarContext);
        const { toastTargetRef, ...args } = statusBarContext;
        return (React.createElement(Component, { ...props, ...args, targetRef: toastTargetRef }));
    };
};
//# sourceMappingURL=withMessageCenterFieldProps.js.map