var MultiTargetRenderer = /** @class */ (function () {
    function MultiTargetRenderer(renderers) {
        this.renderers = {};
        this.renderers = renderers;
    }
    MultiTargetRenderer.prototype.init = function () {
        var _this = this;
        Object.keys(this.renderers).forEach(function (channelId) {
            var renderer = _this.resolve(channelId);
            if (renderer) {
                renderer.init(channelId);
            }
        });
    };
    MultiTargetRenderer.prototype.resolve = function (channelId) {
        var renderer = this.renderers[channelId];
        if (renderer) {
            return renderer;
        }
        console.error("No renderer registered for channelId " + channelId);
        return null;
    };
    MultiTargetRenderer.prototype.appendContent = function (element, channelId) {
        var renderer = this.resolve(channelId);
        if (renderer)
            renderer.appendContent(element);
    };
    MultiTargetRenderer.prototype.appendSuggest = function (element, channelId) {
        var renderer = this.resolve(channelId);
        if (renderer)
            renderer.appendSuggest(element);
    };
    MultiTargetRenderer.prototype.render = function (message, containerType) {
        var channelId = message.channelId;
        var renderer = this.resolve(channelId);
        return renderer ? renderer.render(message, containerType) : [];
    };
    return MultiTargetRenderer;
}());
export { MultiTargetRenderer };
//# sourceMappingURL=MultiTargetRenderer.js.map