'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-b499856a.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 = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /**
     * [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 (index.h(index.Host, { class: this.componentClass }, index.h("telia-vst", { dataTrackingId: this.dataTrackingId }), index.h("img", { alt: this.imgAlt, class: this.componentClass.concat('__image'), src: this.getLogoSource(), role: "img" })));
  }
};
TeliaLogo.style = teliaLogoCss;

exports.telia_logo = TeliaLogo;
