import { Component, h, Prop, Host, Watch, Event, } from '@stencil/core';
import uniqueId from '../../utils/uniqueId';
export class TeliaTabContent {
  constructor() {
    /** Test id set for web component host */
    this.dataTestid = null;
    /** Use `tabId` prop on `telia-tab-content`, in order to set `id` attribute of the component. This *id* will, then be emitted with the `vocaTabChange` event, when the user switches tabs. */
    this.tabId = uniqueId('telia-tab');
  }
  updateName(e) {
    this.vocaTabContentNameChange.emit(e);
  }
  render() {
    const classes = {
      'telia-tab-content': true,
      'telia-tab-content--selected': this.active,
    };
    return (h(Host, { active: this.active, id: this.tabId },
      h("div", { class: classes, role: "tabpanel", id: this.tabId + '-content', "aria-labelledby": this.tabId + '-header' },
        h("slot", null))));
  }
  static get is() { return "telia-tab-content"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["telia-tab-content.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["telia-tab-content.css"]
  }; }
  static get properties() { return {
    "dataTestid": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Test id set for web component host"
      },
      "attribute": "data-testid",
      "reflect": false,
      "defaultValue": "null"
    },
    "tabId": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Use `tabId` prop on `telia-tab-content`, in order to set `id` attribute of the component. This *id* will, then be emitted with the `vocaTabChange` event, when the user switches tabs."
      },
      "attribute": "tab-id",
      "reflect": false,
      "defaultValue": "uniqueId('telia-tab')"
    },
    "active": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Toggle active tab (if used with telia-tab, acts as default tab)"
      },
      "attribute": "active",
      "reflect": false
    },
    "icon": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Name of icon for tab header"
      },
      "attribute": "icon",
      "reflect": false
    },
    "name": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Title of tab header"
      },
      "attribute": "name",
      "reflect": false
    }
  }; }
  static get events() { return [{
      "method": "vocaTabContentNameChange",
      "name": "vocaTabContentNameChange",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": "Emitted when name value changes."
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get watchers() { return [{
      "propName": "name",
      "methodName": "updateName"
    }]; }
}
