import { Component, Prop, Host, h } from '@stencil/core';
import { LinkVariant } from '../../types/LinkVariant';
export class TeliaLink {
  constructor() {
    /** A silent link is intended to wrap an element
     * to make it a link but not add any styling
     * except for the pointer cursor and focus style. */
    this.silent = false;
    /**
     * Determines if link is displayed on its own line
     * (standalone) or within the current text content
     * (text).
     */
    this.variant = LinkVariant.TEXT;
    /** Disables visited styling */
    this.disableVisited = false;
    /**
     * When used on a dark background, set this
     * property to true. This will change color of text
     * and hover to something suitable.
     */
    this.darkBackground = false;
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-link';
  }
  render() {
    const componentClass = 'telia-link';
    const linkClasses = {
      [componentClass]: true,
      standalone: this.variant === 'standalone',
    };
    return (h(Host, { class: linkClasses },
      h("telia-style-link", { silent: this.silent, variant: this.variant, "data-testid": this.dataTestid, "disable-visited": this.disableVisited, "dark-background": this.darkBackground },
        h("a", { href: this.href, target: this.target, download: this.download, "referrer-policy": this.referrerPolicy, title: this.linkTitle, class: `${componentClass}__link` },
          h("slot", { name: "left" }),
          h("slot", null),
          h("slot", { name: "right" }))),
      h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
  static get is() { return "telia-link"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["telia-link.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["telia-link.css"]
  }; }
  static get properties() { return {
    "href": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "GetAttributeType<'a', 'href'>",
        "resolved": "string",
        "references": {
          "GetAttributeType": {
            "location": "import",
            "path": "../../types/GetAttributeType"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Native href attribute of anchor element"
      },
      "attribute": "href",
      "reflect": false
    },
    "silent": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "A silent link is intended to wrap an element\nto make it a link but not add any styling\nexcept for the pointer cursor and focus style."
      },
      "attribute": "silent",
      "reflect": false,
      "defaultValue": "false"
    },
    "variant": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "LinkVariantType",
        "resolved": "\"standalone\" | \"text\"",
        "references": {
          "LinkVariantType": {
            "location": "import",
            "path": "../../types/LinkVariant"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Determines if link is displayed on its own line\n(standalone) or within the current text content\n(text)."
      },
      "attribute": "variant",
      "reflect": false,
      "defaultValue": "LinkVariant.TEXT"
    },
    "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
    },
    "target": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "GetAttributeType<'a', 'target'>",
        "resolved": "string",
        "references": {
          "GetAttributeType": {
            "location": "import",
            "path": "../../types/GetAttributeType"
          }
        }
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": "Native target attribute of anchor element"
      },
      "attribute": "target",
      "reflect": false
    },
    "download": {
      "type": "any",
      "mutable": false,
      "complexType": {
        "original": "GetAttributeType<'a', 'download'>",
        "resolved": "any",
        "references": {
          "GetAttributeType": {
            "location": "import",
            "path": "../../types/GetAttributeType"
          }
        }
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": "Native download attribute of anchor element"
      },
      "attribute": "download",
      "reflect": false
    },
    "referrerPolicy": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "ReferrerPolicy",
        "resolved": "\"\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\"",
        "references": {
          "ReferrerPolicy": {
            "location": "global"
          }
        }
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": "Native referrerPolicy attribute of anchor element"
      },
      "attribute": "referrer-policy",
      "reflect": false
    },
    "linkTitle": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "The link title attribute is shown on hover"
      },
      "attribute": "link-title",
      "reflect": false
    },
    "disableVisited": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "Disables visited styling"
      },
      "attribute": "disable-visited",
      "reflect": false,
      "defaultValue": "false"
    },
    "darkBackground": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "When used on a dark background, set this\nproperty to true. This will change color of text\nand hover to something suitable."
      },
      "attribute": "dark-background",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
}
