"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var PropTypes = require("prop-types");
var Utilities_1 = require("../Utilities");
var StoreHost = (function (_super) {
    tslib_1.__extends(StoreHost, _super);
    function StoreHost() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    StoreHost.prototype.getChildContext = function () {
        var parentStores = this.context.stores;
        var currentStores = this.props.stores;
        return { stores: parentStores ? parentStores.merge(currentStores) : currentStores };
    };
    StoreHost.prototype.render = function () {
        return React.Children.only(this.props.children);
    };
    return StoreHost;
}(Utilities_1.BaseComponent));
StoreHost.contextTypes = {
    stores: PropTypes.object
};
StoreHost.childContextTypes = {
    stores: PropTypes.object
};
exports.StoreHost = StoreHost;

//# sourceMappingURL=StoreHost.js.map
