import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
import { L as LinkVariant, d as defineCustomElement$2 } from './telia-style-link2.js';
import { d as defineCustomElement$1 } from './telia-vst2.js';

const teliaLinkCss = ":host(.standalone){display:flex}.telia-link__link ::slotted([slot=left]){margin-right:calc(0.8rem * var(--voca-rem-multiplier));padding-top:calc(0.2rem * var(--voca-rem-multiplier))}.telia-link__link ::slotted([slot=right]){margin-left:calc(0.8rem * var(--voca-rem-multiplier));padding-top:calc(0.2rem * var(--voca-rem-multiplier))}";

const TeliaLink = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    /** 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 style() { return teliaLinkCss; }
}, [1, "telia-link", {
    "href": [1],
    "silent": [4],
    "variant": [1],
    "dataTestid": [1, "data-testid"],
    "target": [1],
    "download": [8],
    "referrerPolicy": [1, "referrer-policy"],
    "linkTitle": [1, "link-title"],
    "disableVisited": [4, "disable-visited"],
    "darkBackground": [4, "dark-background"]
  }]);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["telia-link", "telia-style-link", "telia-vst"];
  components.forEach(tagName => { switch (tagName) {
    case "telia-link":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, TeliaLink);
      }
      break;
    case "telia-style-link":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
    case "telia-vst":
      if (!customElements.get(tagName)) {
        defineCustomElement$1();
      }
      break;
  } });
}
defineCustomElement();

export { TeliaLink as T, defineCustomElement as d };
