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 IgcTabComponent_1;
import { LitElement, html } from 'lit';
import { property } from 'lit/decorators.js';
import { themes } from '../../theming/theming-decorator.js';
import { registerComponent } from '../common/definitions/register.js';
import { createCounter } from '../common/util.js';
import { styles as shared } from './themes/shared/tab/tab.common.css.js';
import { all } from './themes/tab-themes.js';
import { styles } from './themes/tab.base.css.js';
let IgcTabComponent = IgcTabComponent_1 = class IgcTabComponent extends LitElement {
    constructor() {
        super(...arguments);
        this.label = '';
        this.selected = false;
        this.disabled = false;
    }
    static register() {
        registerComponent(IgcTabComponent_1);
    }
    connectedCallback() {
        super.connectedCallback();
        this.id = this.id || `igc-tab-${IgcTabComponent_1.increment()}`;
    }
    render() {
        const headerId = `${this.id}-header`;
        const contentId = `${this.id}-content`;
        return html `
      <div
        part="tab-header"
        role="tab"
        id=${headerId}
        aria-disabled=${this.disabled}
        aria-selected=${this.selected}
        aria-controls=${contentId}
        tabindex=${this.selected ? 0 : -1}
      >
        <div part="base">
          <slot name="prefix" part="prefix"></slot>
          <div part="content">
            <slot name="label">${this.label}</slot>
          </div>
          <slot name="suffix" part="suffix"></slot>
        </div>
      </div>
      <div
        part="tab-body"
        role="tabpanel"
        id=${contentId}
        aria-labelledby=${headerId}
        .inert=${!this.selected}
      >
        <slot></slot>
      </div>
    `;
    }
};
IgcTabComponent.tagName = 'igc-tab';
IgcTabComponent.styles = [styles, shared];
IgcTabComponent.increment = createCounter();
__decorate([
    property()
], IgcTabComponent.prototype, "label", void 0);
__decorate([
    property({ type: Boolean, reflect: true })
], IgcTabComponent.prototype, "selected", void 0);
__decorate([
    property({ type: Boolean, reflect: true })
], IgcTabComponent.prototype, "disabled", void 0);
IgcTabComponent = IgcTabComponent_1 = __decorate([
    themes(all)
], IgcTabComponent);
export default IgcTabComponent;
//# sourceMappingURL=tab.js.map