"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 tab_1 = require("./tab/tab");
var TabsetComponent = (function () {
    function TabsetComponent() {
    }
    TabsetComponent.prototype.select = function (tab) {
        this.tabs.forEach(function (thisTab) {
            thisTab.isActive = false;
        });
        tab.isActive = true;
    };
    TabsetComponent.prototype.ngAfterContentInit = function () {
        if (this.tabs) {
            this.select(this.tabs.first);
        }
    };
    return TabsetComponent;
}());
__decorate([
    core_1.ContentChildren(tab_1.TabComponent),
    __metadata("design:type", core_1.QueryList)
], TabsetComponent.prototype, "tabs", void 0);
TabsetComponent = __decorate([
    core_1.Component({
        selector: 'rlTabset',
        template: require('./tabset.html'),
    }),
    __metadata("design:paramtypes", [])
], TabsetComponent);
exports.TabsetComponent = TabsetComponent;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFic2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGFic2V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxzQ0FBd0Y7QUFFeEYsaUNBQXlDO0FBTXpDLElBQWEsZUFBZTtJQUUzQjtJQUNBLENBQUM7SUFHRCxnQ0FBTSxHQUFOLFVBQU8sR0FBaUI7UUFDdkIsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsVUFBQSxPQUFPO1lBQ3hCLE9BQU8sQ0FBQyxRQUFRLEdBQUcsS0FBSyxDQUFDO1FBQzFCLENBQUMsQ0FBQyxDQUFDO1FBRUgsR0FBRyxDQUFDLFFBQVEsR0FBRyxJQUFJLENBQUM7SUFDckIsQ0FBQztJQUVELDRDQUFrQixHQUFsQjtRQUNDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO1lBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQzlCLENBQUM7SUFDRixDQUFDO0lBQ0Ysc0JBQUM7QUFBRCxDQUFDLEFBbkJELElBbUJDO0FBZitCO0lBQTlCLHNCQUFlLENBQUMsa0JBQVksQ0FBQzs4QkFBTyxnQkFBUzs2Q0FBZTtBQUpqRCxlQUFlO0lBSjNCLGdCQUFTLENBQUM7UUFDVixRQUFRLEVBQUUsVUFBVTtRQUNwQixRQUFRLEVBQUUsT0FBTyxDQUFDLGVBQWUsQ0FBQztLQUNsQyxDQUFDOztHQUNXLGVBQWUsQ0FtQjNCO0FBbkJZLDBDQUFlIn0=