import { Component, ContentChildren, Input } from '@angular/core';
import { BsTabPageComponent } from '../tab-page/tab-page.component';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class BsTabControlComponent {
    constructor() {
        this.border = true;
        this.activeTab = null;
    }
    setActiveTab(tab) {
        if (!tab.disabled) {
            this.activeTab = tab;
        }
        return false;
    }
}
BsTabControlComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsTabControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
BsTabControlComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: BsTabControlComponent, selector: "bs-tab-control", inputs: { border: "border" }, queries: [{ propertyName: "tabPages", predicate: BsTabPageComponent }], ngImport: i0, template: "<ul class=\"nav nav-tabs\">\n  <ng-container *ngFor=\"let tab of tabPages\">\n    <li class=\"nav-item\" (click)=\"setActiveTab(tab)\" *ngIf=\"!!tab.headerTemplate\">\n      <a class=\"nav-link\" [class.active]=\"activeTab === tab\" [class.disabled]=\"tab.disabled\" [attr.aria-current]=\"activeTab === tab ? 'page' : null\" [attr.aria-disabled]=\"tab.disabled\" href=\"\">\n        <ng-container [ngTemplateOutlet]=\"tab.headerTemplate\"></ng-container>\n      </a>\n    </li>\n  </ng-container>\n</ul>\n<div class=\"tab-content\" [class.border]=\"border && activeTab\">\n  <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .nav{--bs-nav-link-padding-x: 1rem;--bs-nav-link-padding-y: .5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color: var(--bs-link-color);--bs-nav-link-hover-color: var(--bs-link-hover-color);--bs-nav-link-disabled-color: #6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}:host ::ng-deep .nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion: reduce){:host ::ng-deep .nav-link{transition:none}}:host ::ng-deep .nav-link:hover,:host ::ng-deep .nav-link:focus{color:var(--bs-nav-link-hover-color)}:host ::ng-deep .nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}:host ::ng-deep .nav-tabs{--bs-nav-tabs-border-width: 1px;--bs-nav-tabs-border-color: #dee2e6;--bs-nav-tabs-border-radius: .375rem;--bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color: #495057;--bs-nav-tabs-link-active-bg: #fff;--bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}:host ::ng-deep .nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:none;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}:host ::ng-deep .nav-tabs .nav-link:hover,:host ::ng-deep .nav-tabs .nav-link:focus{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}:host ::ng-deep .nav-tabs .nav-link.disabled,:host ::ng-deep .nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}:host ::ng-deep .nav-tabs .nav-link.active,:host ::ng-deep .nav-tabs .nav-item.show .nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host ::ng-deep .nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .nav-pills{--bs-nav-pills-border-radius: .375rem;--bs-nav-pills-link-active-color: #fff;--bs-nav-pills-link-active-bg: #0d6efd}:host ::ng-deep .nav-pills .nav-link{background:none;border:0;border-radius:var(--bs-nav-pills-border-radius)}:host ::ng-deep .nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}:host ::ng-deep .nav-pills .nav-link.active,:host ::ng-deep .nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}:host ::ng-deep .nav-fill>.nav-link,:host ::ng-deep .nav-fill .nav-item{flex:1 1 auto;text-align:center}:host ::ng-deep .nav-justified>.nav-link,:host ::ng-deep .nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}:host ::ng-deep .nav-fill .nav-item .nav-link,:host ::ng-deep .nav-justified .nav-item .nav-link{width:100%}:host ::ng-deep .tab-content>.tab-pane{display:none}:host ::ng-deep .tab-content>.active{display:block}:host ::ng-deep .tab-content{margin-top:-1px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BsTabControlComponent, decorators: [{
            type: Component,
            args: [{ selector: 'bs-tab-control', template: "<ul class=\"nav nav-tabs\">\n  <ng-container *ngFor=\"let tab of tabPages\">\n    <li class=\"nav-item\" (click)=\"setActiveTab(tab)\" *ngIf=\"!!tab.headerTemplate\">\n      <a class=\"nav-link\" [class.active]=\"activeTab === tab\" [class.disabled]=\"tab.disabled\" [attr.aria-current]=\"activeTab === tab ? 'page' : null\" [attr.aria-disabled]=\"tab.disabled\" href=\"\">\n        <ng-container [ngTemplateOutlet]=\"tab.headerTemplate\"></ng-container>\n      </a>\n    </li>\n  </ng-container>\n</ul>\n<div class=\"tab-content\" [class.border]=\"border && activeTab\">\n  <ng-content></ng-content>\n</div>", styles: [":host ::ng-deep .nav{--bs-nav-link-padding-x: 1rem;--bs-nav-link-padding-y: .5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color: var(--bs-link-color);--bs-nav-link-hover-color: var(--bs-link-hover-color);--bs-nav-link-disabled-color: #6c757d;display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}:host ::ng-deep .nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media (prefers-reduced-motion: reduce){:host ::ng-deep .nav-link{transition:none}}:host ::ng-deep .nav-link:hover,:host ::ng-deep .nav-link:focus{color:var(--bs-nav-link-hover-color)}:host ::ng-deep .nav-link.disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}:host ::ng-deep .nav-tabs{--bs-nav-tabs-border-width: 1px;--bs-nav-tabs-border-color: #dee2e6;--bs-nav-tabs-border-radius: .375rem;--bs-nav-tabs-link-hover-border-color: #e9ecef #e9ecef #dee2e6;--bs-nav-tabs-link-active-color: #495057;--bs-nav-tabs-link-active-bg: #fff;--bs-nav-tabs-link-active-border-color: #dee2e6 #dee2e6 #fff;border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}:host ::ng-deep .nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));background:none;border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}:host ::ng-deep .nav-tabs .nav-link:hover,:host ::ng-deep .nav-tabs .nav-link:focus{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}:host ::ng-deep .nav-tabs .nav-link.disabled,:host ::ng-deep .nav-tabs .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}:host ::ng-deep .nav-tabs .nav-link.active,:host ::ng-deep .nav-tabs .nav-item.show .nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host ::ng-deep .nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .nav-pills{--bs-nav-pills-border-radius: .375rem;--bs-nav-pills-link-active-color: #fff;--bs-nav-pills-link-active-bg: #0d6efd}:host ::ng-deep .nav-pills .nav-link{background:none;border:0;border-radius:var(--bs-nav-pills-border-radius)}:host ::ng-deep .nav-pills .nav-link:disabled{color:var(--bs-nav-link-disabled-color);background-color:transparent;border-color:transparent}:host ::ng-deep .nav-pills .nav-link.active,:host ::ng-deep .nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}:host ::ng-deep .nav-fill>.nav-link,:host ::ng-deep .nav-fill .nav-item{flex:1 1 auto;text-align:center}:host ::ng-deep .nav-justified>.nav-link,:host ::ng-deep .nav-justified .nav-item{flex-basis:0;flex-grow:1;text-align:center}:host ::ng-deep .nav-fill .nav-item .nav-link,:host ::ng-deep .nav-justified .nav-item .nav-link{width:100%}:host ::ng-deep .tab-content>.tab-pane{display:none}:host ::ng-deep .tab-content>.active{display:block}:host ::ng-deep .tab-content{margin-top:-1px}\n"] }]
        }], propDecorators: { tabPages: [{
                type: ContentChildren,
                args: [BsTabPageComponent]
            }], border: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFiLWNvbnRyb2wuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4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