"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 index_1 = require("./tabHeader/index");
var form_1 = require("../../../form/form");
var TabComponent = (function () {
    function TabComponent() {
    }
    Object.defineProperty(TabComponent.prototype, "isValid", {
        get: function () {
            var hasChildForm = this.childForm != null;
            if (hasChildForm) {
                return this.childForm.form.valid;
            }
            return true;
        },
        enumerable: true,
        configurable: true
    });
    return TabComponent;
}());
__decorate([
    core_1.ContentChild(index_1.TabHeaderComponent),
    __metadata("design:type", index_1.TabHeaderComponent)
], TabComponent.prototype, "header", void 0);
__decorate([
    core_1.ContentChild(form_1.FormComponent),
    __metadata("design:type", form_1.FormComponent)
], TabComponent.prototype, "childForm", void 0);
TabComponent = __decorate([
    core_1.Component({
        selector: 'rlTab',
        template: require('./tab.html'),
    }),
    __metadata("design:paramtypes", [])
], TabComponent);
exports.TabComponent = TabComponent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGFiLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxzQ0FBd0Q7QUFFeEQsMkNBQXVEO0FBS3ZELDJDQUFtRDtBQU1uRCxJQUFhLFlBQVk7SUFTeEI7SUFDQSxDQUFDO0lBRUQsc0JBQUksaUNBQU87YUFBWDtZQUNDLElBQUksWUFBWSxHQUFZLElBQUksQ0FBQyxTQUFTLElBQUksSUFBSSxDQUFDO1lBQ25ELEVBQUUsQ0FBQyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUM7Z0JBQ2xCLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUM7WUFDbEMsQ0FBQztZQUNELE1BQU0sQ0FBQyxJQUFJLENBQUM7UUFDYixDQUFDOzs7T0FBQTtJQUNGLG1CQUFDO0FBQUQsQ0FBQyxBQW5CRCxJQW1CQztBQWpCQTtJQURDLG1CQUFZLENBQUMsMEJBQWtCLENBQUM7OEJBQ3pCLDBCQUFrQjs0Q0FBQztBQUczQjtJQURDLG1CQUFZLENBQUMsb0JBQWEsQ0FBQzs4QkFDakIsb0JBQWE7K0NBQUM7QUFMYixZQUFZO0lBSnhCLGdCQUFTLENBQUM7UUFDVixRQUFRLEVBQUUsT0FBTztRQUNqQixRQUFRLEVBQUUsT0FBTyxDQUFDLFlBQVksQ0FBQztLQUMvQixDQUFDOztHQUNXLFlBQVksQ0FtQnhCO0FBbkJZLG9DQUFZIn0=