var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@angular/core", "../../config/config", "../ion"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var config_1 = require("../../config/config");
var ion_1 = require("../ion");
/**
* @hidden
*/
var TabButton = (function (_super) {
__extends(TabButton, _super);
function TabButton(config, elementRef, renderer) {
var _this = _super.call(this, config, elementRef, renderer) || this;
_this.ionSelect = new core_1.EventEmitter();
_this.disHover = (config.get('hoverCSS') === false);
_this.layout = config.get('tabsLayout');
return _this;
}
TabButton.prototype.ngOnInit = function () {
this.tab.btn = this;
this.layout = this.tab.parent.tabsLayout || this.layout;
this.hasTitle = !!this.tab.tabTitle;
this.hasIcon = !!this.tab.tabIcon && this.layout !== 'icon-hide';
this.hasTitleOnly = (this.hasTitle && !this.hasIcon);
this.hasIconOnly = (this.hasIcon && !this.hasTitle);
this.hasBadge = !!this.tab.tabBadge;
};
TabButton.prototype.onClick = function () {
this.ionSelect.emit(this.tab);
return false;
};
TabButton.prototype.updateHref = function (href) {
this.setElementAttribute('href', href);
};
TabButton.decorators = [
{ type: core_1.Component, args: [{
selector: '.tab-button',
template: '