import { Component, h, Prop } from '@stencil/core';
export class TeliaLabel {
  constructor() {
    /** Test id set for web component host */
    this.dataTestid = null;
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-label';
    /**
     * Renders content passed in via props or fallbacks to slot
     * @private
     */
    this.renderContent = () => {
      if (this.text) {
        return this.text;
      }
      return h("slot", null);
    };
  }
  render() {
    return (h("label", { class: "telia-label", htmlFor: this.htmlFor, "data-testId": this.dataTestid },
      this.renderContent(),
      h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
  static get is() { return "telia-label"; }
  static get originalStyleUrls() { return {
    "$": ["telia-label.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["telia-label.css"]
  }; }
  static get properties() { return {
    "htmlFor": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": "For defining to which input label is referring."
      },
      "attribute": "html-for",
      "reflect": false
    },
    "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"
    },
    "text": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Text which will be displayed inside the label"
      },
      "attribute": "text",
      "reflect": false
    }
  }; }
}
