import { Component, ContentChild, Input, Host, Inject, forwardRef } from '@angular/core';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { EuiTabContentComponent } from '../eui-tab-content/eui-tab-content.component';
import { EuiTabLabelComponent } from '../eui-tab-label/eui-tab-label.component';
import { EuiTabsComponent } from '../eui-tabs.component';
import { BaseDirective } from '../../../base.directive';
import * as i0 from "@angular/core";
import * as i1 from "../eui-tabs.component";
const _c0 = ["*"];
export class EuiTabComponent extends BaseDirective {
    constructor(euiTabsComponent) {
        super();
        this.euiTabsComponent = euiTabsComponent;
        this._isClosable = false;
        this.e2eAttr = 'eui-tab';
        this._isVisible = true;
        this._isActive = false;
        this._isDisabled = false;
        this._hasBackgroundFilled = false;
    }
    get isClosable() { return this._isClosable; }
    set isClosable(value) { this._isClosable = coerceBooleanProperty(value); }
    get isVisible() { return this._isVisible; }
    set isVisible(value) { this._isVisible = coerceBooleanProperty(value); }
    get isActive() { return this._isActive; }
    set isActive(value) { this._isActive = coerceBooleanProperty(value); }
    get isDisabled() { return this._isDisabled; }
    set isDisabled(value) { this._isDisabled = coerceBooleanProperty(value); }
    get hasBackgroundFilled() { return this._hasBackgroundFilled; }
    set hasBackgroundFilled(value) { this._hasBackgroundFilled = coerceBooleanProperty(value); }
    get templateLabel() { return this._templateLabel; }
    set templateLabel(value) { this.setTemplateLabelInput(value); }
    get templateContent() { return this._templateContent; }
    set templateContent(value) { this.setTemplateContentInput(value); }
    ngOnChanges() {
        this.euiTabsComponent.detectChanges();
    }
    setTemplateLabelInput(value) {
        if (value) {
            this._templateLabel = value;
        }
    }
    setTemplateContentInput(value) {
        if (value) {
            this._templateContent = value;
        }
    }
}
/** @nocollapse */ EuiTabComponent.ɵfac = function EuiTabComponent_Factory(t) { return new (t || EuiTabComponent)(i0.ɵɵdirectiveInject(forwardRef(() => EuiTabsComponent), 1)); };
/** @nocollapse */ EuiTabComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EuiTabComponent, selectors: [["eui-tab"]], contentQueries: function EuiTabComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
        i0.ɵɵcontentQuery(dirIndex, EuiTabLabelComponent, true);
        i0.ɵɵcontentQuery(dirIndex, EuiTabContentComponent, true);
    } if (rf & 2) {
        var _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateLabel = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateContent = _t.first);
    } }, inputs: { isClosable: "isClosable", url: "url", e2eAttr: "e2eAttr", isVisible: "isVisible", isActive: "isActive", isDisabled: "isDisabled", hasBackgroundFilled: "hasBackgroundFilled", tooltip: "tooltip" }, features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature], ngContentSelectors: _c0, decls: 1, vars: 0, template: function EuiTabComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵprojectionDef();
        i0.ɵɵprojection(0);
    } }, styles: [".eui-tabs__items[_ngcontent-%COMP%]{display:flex!important;position:relative;width:100%}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items-wrapper[_ngcontent-%COMP%]{display:flex;flex-shrink:0}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]{justify-content:space-between;overflow:hidden}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]   .eui-tabs__navigation[_ngcontent-%COMP%]   .eui-tabs__navigation__left-item[_ngcontent-%COMP%]{background-color:var(--eui-color-grey-lightester);box-shadow:3px 0 6px 1px rgba(0,0,0,.25);display:none;height:100%;left:0;position:absolute;top:0}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]   .eui-tabs__navigation[_ngcontent-%COMP%]   .eui-tabs__navigation__left-item[_ngcontent-%COMP%]   .eui-button.eui-button--icon-only[_ngcontent-%COMP%]{height:100%}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]   .eui-tabs__navigation[_ngcontent-%COMP%]   .eui-tabs__navigation__right-item[_ngcontent-%COMP%]{background-color:var(--eui-color-grey-lightester);box-shadow:-3px 0 6px 1px rgba(0,0,0,.25);display:none;height:100%;position:absolute;right:0;top:0}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]   .eui-tabs__navigation[_ngcontent-%COMP%]   .eui-tabs__navigation__right-item[_ngcontent-%COMP%]   .eui-button.eui-button--icon-only[_ngcontent-%COMP%]{height:100%}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items--scrolling[_ngcontent-%COMP%]   .eui-tabs__items-wrapper[_ngcontent-%COMP%]{padding-left:var(--eui-spacing-3xl);padding-right:var(--eui-spacing)}.eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items--scrolling[_ngcontent-%COMP%]   .eui-tabs__navigation__left-item[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tabs__items--scrolling[_ngcontent-%COMP%]   .eui-tabs__navigation__right-item[_ngcontent-%COMP%]{display:block!important;padding:2px}.eui-tabs__right-content[_ngcontent-%COMP%]{align-items:center;display:flex;margin-left:auto}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]{align-items:center;background-color:inherit;border:none;border-bottom:3px solid transparent;box-shadow:0 2px 1px rgba(0,0,0,.5),inset 0 1px 0 var(--eui-color-white);color:var(--eui-color-grey-darker);cursor:pointer;display:flex;font-weight:700;padding:var(--eui-spacing-s) var(--eui-spacing) var(--eui-spacing-xs) var(--eui-spacing);position:relative;text-align:center;transition:.5s cubic-bezier(.35,0,.25,1)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item__label[_ngcontent-%COMP%]{align-items:center;display:inline-flex}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]:focus{-moz-outline-radius:var(--eui-base-border-radius);border-bottom:3px solid transparent;outline:2px solid var(--eui-color-accessible-focus);outline-offset:-2px;transition:outline .15s ease-in-out,border .15s ease-in-out}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]:hover:not(.eui-tab-item--active){background:var(--eui-color-grey-lightest);border-bottom:3px solid var(--eui-color-primary);color:var(--eui-color-grey-darkest)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--active[_ngcontent-%COMP%]{background-color:var(--eui-color-grey-lightest);border-bottom:3px solid var(--eui-color-primary);color:var(--eui-color-font)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--hidden[_ngcontent-%COMP%]{display:none}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--closable[_ngcontent-%COMP%]{padding-right:var(--eui-spacing-l)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]   .eui-tab__close-icon[_ngcontent-%COMP%]{color:var(--eui-color-grey-light);position:absolute;right:3px;top:3px}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]   .eui-tab__close-icon[_ngcontent-%COMP%]:hover{color:var(--eui-color-danger)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--disabled[_ngcontent-%COMP%]{color:var(--eui-color-grey);cursor:not-allowed;pointer-events:none}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--disabled[_ngcontent-%COMP%]:hover{border-bottom:3px solid transparent;color:var(--eui-color-grey-light)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]{border-top:1px solid var(--eui-color-grey-lighter);overflow:auto;padding:var(--eui-spacing-s) 0}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar{background-color:var(--eui-color-grey-lightest);display:inherit;height:8px;width:8px}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--eui-color-grey-light);border-radius:5rem}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:var(--eui-color-grey)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:var(--eui-color-grey-lightest);border-radius:0}subtabs[_ngcontent-%COMP%]   .eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]{padding:0}subtabs[_ngcontent-%COMP%]   .eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]{padding:var(--eui-spacing-s) 0}.eui-card[_ngcontent-%COMP%]   .eui-tabs[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]{padding:var(--eui-spacing-s)}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]{display:flex;flex-direction:row}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%] > .eui-tabs__items[_ngcontent-%COMP%]   .eui-tabs__items-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]:not(.eui-tabs__items--horizontal){border-bottom:0;flex:1 1 25%;flex-direction:column;position:relative}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]:not(.eui-tabs__items--horizontal)   .eui-tab-item[_ngcontent-%COMP%]{border-bottom:0;border-left:3px solid transparent;box-shadow:0 0 1px rgba(0,0,0,.65),inset 0 1px 0 var(--eui-color-white)}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]:not(.eui-tabs__items--horizontal)   .eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]:not(.eui-tabs__items--horizontal)   .eui-tab-item[_ngcontent-%COMP%]:active{border-left:3px solid var(--eui-color-primary)}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]:not(.eui-tabs__items--horizontal)   .eui-tab-item[_ngcontent-%COMP%]:hover:not(.eui-tab-item--active){background:var(--eui-color-grey-lightester);border-left:3px solid var(--eui-color-primary);color:var(--eui-color-grey-darkest)}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%]:not(.eui-tabs__items--horizontal)   .eui-tab-item[_ngcontent-%COMP%]:focus{-moz-outline-radius:var(--eui-base-border-radius);border-left:3px solid transparent;outline:2px solid var(--eui-color-accessible-focus);outline-offset:-2px;transition:outline .15s ease-in-out,border .15s ease-in-out}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]{border-top:none;flex:1 1 75%;flex-direction:column;overflow:auto;padding:0 var(--eui-spacing-s);position:relative}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar{background-color:var(--eui-color-grey-lightest);display:inherit;height:8px;width:8px}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--eui-color-grey-light);border-radius:5rem}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:var(--eui-color-grey)}.eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:var(--eui-color-grey-lightest);border-radius:0}.eui-card[_ngcontent-%COMP%]   .eui-tabs.eui-tabs--vertical[_ngcontent-%COMP%]   .eui-tab-content[_ngcontent-%COMP%]{padding:var(--eui-spacing-s)}.eui-tabs--main-navigation[_ngcontent-%COMP%]   .eui-tabs__items[_ngcontent-%COMP%], .eui-tabs--main-navigation[_ngcontent-%COMP%]   .eui-tabs__items-wrapper[_ngcontent-%COMP%]{width:100%}.eui-tabs--main-navigation[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]{flex-grow:1;justify-content:center}.eui-tabs--main-navigation[_ngcontent-%COMP%]   .eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs--main-navigation[_ngcontent-%COMP%]   .eui-tab-item[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:active{background-color:var(--eui-color-primary-lightester)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--primary[_ngcontent-%COMP%]{color:var(--eui-color-primary)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--primary.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--primary[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-primary)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--secondary[_ngcontent-%COMP%]{color:var(--eui-color-grey-darker)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--secondary.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--secondary[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-grey-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--info[_ngcontent-%COMP%]{color:var(--eui-color-info-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--info.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--info[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-info-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--success[_ngcontent-%COMP%]{color:var(--eui-color-success-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--success.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--success[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-success-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--warning[_ngcontent-%COMP%]{color:var(--eui-color-font)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--warning.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--warning[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-warning-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--danger[_ngcontent-%COMP%]{color:var(--eui-color-danger-darker)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--danger.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--danger[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-danger-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--accent[_ngcontent-%COMP%]{color:var(--eui-color-font)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--accent.eui-tab-item--active[_ngcontent-%COMP%], .eui-tabs[_ngcontent-%COMP%]   .eui-tab-item--accent[_ngcontent-%COMP%]:hover{border-bottom-color:var(--eui-color-accent-dark)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled[_ngcontent-%COMP%]{background:none}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--primary[_ngcontent-%COMP%]{background-color:var(--eui-color-primary);color:var(--eui-color-white)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--secondary[_ngcontent-%COMP%]{background-color:var(--eui-color-grey-lightester);color:var(--eui-color-grey-darker)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--info[_ngcontent-%COMP%]{background-color:var(--eui-color-info);color:var(--eui-color-white)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--success[_ngcontent-%COMP%]{background-color:var(--eui-color-success);color:var(--eui-color-white)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--warning[_ngcontent-%COMP%]{background-color:var(--eui-color-warning);color:var(--eui-color-font)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--danger[_ngcontent-%COMP%]{background-color:var(--eui-color-danger);color:var(--eui-color-white)}.eui-tabs[_ngcontent-%COMP%]   .eui-tab-item.eui-tab-item--background-filled.eui-tab-item--accent[_ngcontent-%COMP%]{background-color:var(--eui-color-accent);color:var(--eui-color-font)}"] });
/*@__PURE__*/ (function () { i0.ɵsetClassMetadata(EuiTabComponent, [{
        type: Component,
        args: [{
                selector: 'eui-tab',
                templateUrl: './eui-tab.component.html',
                styleUrls: ['../styles/_index.scss'],
            }]
    }], function () { return [{ type: i1.EuiTabsComponent, decorators: [{
                type: Host
            }, {
                type: Inject,
                args: [forwardRef(() => EuiTabsComponent)]
            }] }]; }, { isClosable: [{
            type: Input
        }], url: [{
            type: Input
        }], e2eAttr: [{
            type: Input
        }], isVisible: [{
            type: Input
        }], isActive: [{
            type: Input
        }], isDisabled: [{
            type: Input
        }], hasBackgroundFilled: [{
            type: Input
        }], tooltip: [{
            type: Input
        }], templateLabel: [{
            type: ContentChild,
            args: [EuiTabLabelComponent]
        }], templateContent: [{
            type: ContentChild,
            args: [EuiTabContentComponent]
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 