import { Component, Prop, h, Host } from '@stencil/core';
export class TeliaLinkImage {
  constructor() {
    /**
     * Set to true when used on a dark background.
     * This will affect color of the svg when interacting with it.
     */
    this.darkBackground = false;
    /**
     * Disables visited styling, defaults to true. Only some image types
     * support styling with color, which is the technique used here.
     * */
    this.disableVisited = true;
    /**
     * This sets a minimum size on the clickable area of the link. Please note
     * it also changes display value to flex, meaning its container will behave
     * like a block element. You can wrap this component in a flex container
     * for additional layout control.
     */
    this.ensureClickArea = false;
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-link-image';
  }
  render() {
    const componentClass = 'telia-link-image';
    const linkClass = {
      [componentClass]: true,
      [`${componentClass}--dark-bg`]: this.darkBackground,
    };
    const slotWrapperClass = {
      [`${componentClass}__slotwrapper`]: true,
      [`${componentClass}__slotwrapper--ensure-click-area`]: this.ensureClickArea,
    };
    return (h(Host, null,
      h("telia-link", { silent: true, href: this.htmlHref, "data-testid": this.dataTestid, "link-title": this.linkText, class: linkClass, "disable-visited": this.disableVisited, "dark-background": this.darkBackground },
        h("div", { class: slotWrapperClass },
          h("slot", null),
          h("telia-visually-hidden", null, this.linkText))),
      h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
  static get is() { return "telia-link-image"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["telia-link-image.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["telia-link-image.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
    },
    "linkText": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Visually hidden text to replace the icon/img in slot"
      },
      "attribute": "link-text",
      "reflect": false
    },
    "htmlHref": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "link to page"
      },
      "attribute": "html-href",
      "reflect": false
    },
    "darkBackground": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Set to true when used on a dark background.\nThis will affect color of the svg when interacting with it."
      },
      "attribute": "dark-background",
      "reflect": false,
      "defaultValue": "false"
    },
    "disableVisited": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Disables visited styling, defaults to true. Only some image types\nsupport styling with color, which is the technique used here."
      },
      "attribute": "disable-visited",
      "reflect": false,
      "defaultValue": "true"
    },
    "ensureClickArea": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "This sets a minimum size on the clickable area of the link. Please note\nit also changes display value to flex, meaning its container will behave\nlike a block element. You can wrap this component in a flex container\nfor additional layout control."
      },
      "attribute": "ensure-click-area",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
}
