import { Component, Input, ViewChild, TemplateRef } from '@angular/core';
import { TabPaneComponent } from '../tabs/tab-pane.component';
export class TabBarItemComponent extends TabPaneComponent {
    constructor() {
        super();
        this.prefixCls = 'am-tab-bar-tab';
        this.selected = false;
        this.tintColor = '#108ee9';
        this.unselectedTintColor = '#888';
        this.key = '';
        this.title = '';
        this.dot = false;
        this.badge = null;
        this.icon = null;
        this.selectedIcon = null;
    }
    isTemplateRef(value) {
        return value instanceof TemplateRef;
    }
}
TabBarItemComponent.decorators = [
    { type: Component, args: [{
                selector: 'TabBarItem, nzm-tab-bar-item',
                template: "<ng-template #content>\n  <ng-content></ng-content>\n</ng-template>\n\n<ng-template #tabBarTab>\n  <div class=\"{{ prefixCls }}-icon\" [style.color]=\"selected ? tintColor : unselectedTintColor\">\n    <Badge *ngIf=\"badge\" className=\"{{ prefixCls }}-badge tab-badge\" [text]=\"badge\">\n      <ng-container *ngIf=\"isTemplateRef(selected ? selectedIcon : icon); then domTemplate; else imgTemplate\">\n      </ng-container>\n    </Badge>\n    <Badge className=\"{{ prefixCls }}-badge tab-badge\" [dot]=\"dot\" *ngIf=\"dot\">\n      <ng-container *ngIf=\"isTemplateRef(selected ? selectedIcon : icon); then domTemplate; else imgTemplate\">\n      </ng-container>\n    </Badge>\n    <ng-container *ngIf=\"!badge && !dot\">\n      <ng-container *ngIf=\"isTemplateRef(selected ? selectedIcon : icon); then domTemplate; else imgTemplate\">\n      </ng-container>\n    </ng-container>\n  </div>\n  <p class=\"{{ prefixCls }}-title\" [style.color]=\"selected ? tintColor : unselectedTintColor\">\n    {{ title }}\n  </p>\n</ng-template>\n\n<ng-template #domTemplate>\n  <ng-template [ngTemplateOutlet]=\"selected ? selectedIcon : icon\"></ng-template>\n</ng-template>\n\n<ng-template #imgTemplate>\n  <img src=\"{{ selected ? selectedIcon : icon }}\" alt=\"{{ title }}\" />\n</ng-template>\n"
            },] }
];
TabBarItemComponent.ctorParameters = () => [];
TabBarItemComponent.propDecorators = {
    tabBarTab: [{ type: ViewChild, args: ['tabBarTab', { static: true },] }],
    key: [{ type: Input }],
    title: [{ type: Input }],
    dot: [{ type: Input }],
    badge: [{ type: Input }],
    icon: [{ type: Input }],
    selectedIcon: [{ type: Input }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWJhci1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2NvbXBvbmVudHMvdGFiLWJhci90YWItYmFyLWl0ZW0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFNBQVMsRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFNOUQsTUFBTSxPQUFPLG1CQUFvQixTQUFRLGdCQUFnQjtJQXNCdkQ7UUFDRSxLQUFLLEVBQUUsQ0FBQztRQXRCVixjQUFTLEdBQVcsZ0JBQWdCLENBQUM7UUFDckMsYUFBUSxHQUFZLEtBQUssQ0FBQztRQUMxQixjQUFTLEdBQVcsU0FBUyxDQUFDO1FBQzlCLHdCQUFtQixHQUFXLE1BQU0sQ0FBQztRQU1yQyxRQUFHLEdBQVcsRUFBRSxDQUFDO1FBRWpCLFVBQUssR0FBVyxFQUFFLENBQUM7UUFFbkIsUUFBRyxHQUFZLEtBQUssQ0FBQztRQUVyQixVQUFLLEdBQW9CLElBQUksQ0FBQztRQUU5QixTQUFJLEdBQStCLElBQUksQ0FBQztRQUV4QyxpQkFBWSxHQUErQixJQUFJLENBQUM7SUFJaEQsQ0FBQztJQUVELGFBQWEsQ0FBQyxLQUFLO1FBQ2pCLE9BQU8sS0FBSyxZQUFZLFdBQVcsQ0FBQztJQUN0QyxDQUFDOzs7WUFoQ0YsU0FBUy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