"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var core_1 = require("@angular/core");
var rxjs_1 = require("rxjs");
var lodash_1 = require("lodash");
var index_1 = require("../cardContainer/builder/index");
var index_2 = require("../cards/index");
var index_3 = require("../cardContainer/templates/index");
var columnHeader_template_1 = require("../cardContainer/templates/columnHeader.template");
var SimpleCardContainer = (function () {
    function SimpleCardContainer(cardContainerBuilder) {
        this.cardContainerBuilder = cardContainerBuilder;
        this.data$ = new rxjs_1.BehaviorSubject(null);
    }
    Object.defineProperty(SimpleCardContainer.prototype, "data", {
        set: function (value) {
            this.data$.next(value);
        },
        enumerable: true,
        configurable: true
    });
    SimpleCardContainer.prototype.ngOnInit = function () {
        var _this = this;
        this.builder = this.cardContainerBuilder.getInstance(this.options || {});
        lodash_1.each(this.columns, function (column) {
            _this.cardContainerBuilder.addColumn(_this.builder, column);
        });
        this.cardContainerBuilder.buildObservableDataSource(this.builder, this.data$);
    };
    return SimpleCardContainer;
}());
__decorate([
    core_1.Input(),
    __metadata("design:type", Array)
], SimpleCardContainer.prototype, "columns", void 0);
__decorate([
    core_1.Input(),
    __metadata("design:type", Object)
], SimpleCardContainer.prototype, "options", void 0);
__decorate([
    core_1.Input(),
    __metadata("design:type", Array),
    __metadata("design:paramtypes", [Array])
], SimpleCardContainer.prototype, "data", null);
__decorate([
    core_1.ContentChild(index_3.ContainerHeaderTemplate),
    __metadata("design:type", index_3.ContainerHeaderTemplate)
], SimpleCardContainer.prototype, "containerHeader", void 0);
__decorate([
    core_1.ContentChild(index_3.ContainerFooterTemplate),
    __metadata("design:type", index_3.ContainerFooterTemplate)
], SimpleCardContainer.prototype, "containerFooter", void 0);
__decorate([
    core_1.ContentChild(index_2.CardContentTemplate),
    __metadata("design:type", index_2.CardContentTemplate)
], SimpleCardContainer.prototype, "cardContent", void 0);
__decorate([
    core_1.ContentChild(index_2.CardFooterTemplate),
    __metadata("design:type", index_2.CardFooterTemplate)
], SimpleCardContainer.prototype, "cardFooter", void 0);
__decorate([
    core_1.ContentChildren(index_3.ColumnContentTemplate),
    __metadata("design:type", core_1.QueryList)
], SimpleCardContainer.prototype, "columnTemplates", void 0);
__decorate([
    core_1.ContentChildren(columnHeader_template_1.ColumnHeaderTemplate),
    __metadata("design:type", core_1.QueryList)
], SimpleCardContainer.prototype, "columnHeaders", void 0);
SimpleCardContainer = __decorate([
    core_1.Component({
        selector: 'rlSimpleCardContainer',
        template: require('./simpleCardContainer.html'),
    }),
    __metadata("design:paramtypes", [index_1.CardContainerBuilderService])
], SimpleCardContainer);
exports.SimpleCardContainer = SimpleCardContainer;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2ltcGxlQ2FyZENvbnRhaW5lci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNpbXBsZUNhcmRDb250YWluZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLHNDQUFtRztBQUNuRyw2QkFBbUQ7QUFDbkQsaUNBQThCO0FBRzlCLHdEQUE2SDtBQUM3SCx3Q0FBeUU7QUFDekUsMERBQTJIO0FBQzNILDBGQUF3RjtBQU14RixJQUFhLG1CQUFtQjtJQW9CL0IsNkJBQVksb0JBQWlEO1FBQzVELElBQUksQ0FBQyxvQkFBb0IsR0FBRyxvQkFBb0IsQ0FBQztRQUNqRCxJQUFJLENBQUM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