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

const LogoVariant = {
  PRIMARY: 'primary',
  PRIMARY_SYMBOL: 'primary-symbol',
  SECONDARY: 'secondary',
  SECONDARY_SYMBOL: 'secondary-symbol',
  BLACK: 'black',
  BLACK_SYMBOL: 'black-symbol',
};
Object.values(LogoVariant);

const teliaLogoCss = ".telia-logo{display:block}.telia-logo__image{height:calc(3.2rem * var(--voca-rem-multiplier))}";

const TeliaLogo = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    /**
     * [DEPRECATED: 2022-05-10]: Use `variant='secondary'` instead.
     */
    this.darkBackground = false;
    /**
     * The variant/appearance of the logo.
     */
    this.variant = LogoVariant.PRIMARY;
    this.componentClass = 'telia-logo';
    this.assetServer = 'https://cdn.voca.teliacompany.com/logo/';
    this.logoAsset = {
      [LogoVariant.PRIMARY]: 'Telia-primary-default-v2.svg',
      [LogoVariant.PRIMARY_SYMBOL]: 'Telia-primary-symbol-only-v2.svg',
      [LogoVariant.SECONDARY]: 'Telia-secondary-default-v2.svg',
      [LogoVariant.SECONDARY_SYMBOL]: 'Telia-secondary-symbol-only-v2.svg',
      [LogoVariant.BLACK]: 'Telia-black-default-v2.svg',
      [LogoVariant.BLACK_SYMBOL]: 'Telia-black-symbol-only-v2.svg',
    };
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-logo';
  }
  getLogoSource() {
    let resource = '';
    if (this.darkBackground) {
      resource = this.logoAsset[LogoVariant.SECONDARY];
    }
    else {
      resource = this.logoAsset[this.variant];
    }
    return this.assetServer.concat(resource);
  }
  render() {
    return (h(Host, { class: this.componentClass }, h("telia-vst", { dataTrackingId: this.dataTrackingId }), h("img", { alt: this.imgAlt, class: this.componentClass.concat('__image'), src: this.getLogoSource(), role: "img" })));
  }
  static get style() { return teliaLogoCss; }
}, [1, "telia-logo", {
    "dataTestid": [1, "data-testid"],
    "darkBackground": [4, "dark-background"],
    "imgAlt": [1, "img-alt"],
    "variant": [1]
  }]);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["telia-logo", "telia-vst"];
  components.forEach(tagName => { switch (tagName) {
    case "telia-logo":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, TeliaLogo);
      }
      break;
    case "telia-vst":
      if (!customElements.get(tagName)) {
        defineCustomElement$1();
      }
      break;
  } });
}
defineCustomElement();

export { TeliaLogo as T, defineCustomElement as d };
