"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Deprecated = Deprecated;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const warning_1 = tslib_1.__importDefault(require("./warning"));
// @deprecated wrapper
function Deprecated(fc, msg) {
    return (props) => {
        react_1.default.useEffect(() => {
            // https://reactjs.org/docs/higher-order-components.html#convention-wrap-the-display-name-for-easy-debugging
            (0, warning_1.default)(false, `${fc.displayName || fc.name} is deprecated: ${msg}`);
        }, []);
        return react_1.default.createElement(fc, props);
    };
}
//# sourceMappingURL=deprecated.js.map