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