"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.withDI = withDI;
exports.registerReplacement = registerReplacement;
const react_1 = __importDefault(require("react"));
const replacements = {};
function withDI(name, OriginalObject, props) {
    if (replacements[name]) {
        const ReplacementObject = replacements[name].component;
        return react_1.default.createElement(ReplacementObject, Object.assign({}, props));
    }
    else {
        return react_1.default.createElement(OriginalObject, Object.assign({}, props));
    }
}
function registerReplacement(name, component) {
    replacements[name] = { component };
}
//# sourceMappingURL=DIProvider.js.map