'use strict';

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

const index = require('./index-b499856a.js');

/** Create Month and year when component was encountered, for analytics */
function getVocaAdded(Date) {
  return `${Date.getFullYear()}.${Date.getMonth() + 1}`;
}

class VocaStatsEntity {
  constructor(dataTrackingId) {
    /** Underscore aka snake case is used, for support of GTM statistics requirements */
    this.voca_component = dataTrackingId;
    /** This value saves month and year used in a _id, for uniqueness of collected data.  */
    this.voca_added = getVocaAdded(new Date());
  }
}

const teliaVstCss = "telia-vst{display:none}";

const TeliaVST = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.vocaInternalUStats = index.createEvent(this, "vocaInternalUStats", 7);
  }
  connectedCallback() {
    this.vocaInternalUStats.emit(new VocaStatsEntity(this.dataTrackingId));
  }
  render() {
    return index.h(index.Host, null);
  }
};
TeliaVST.style = teliaVstCss;

exports.telia_vst = TeliaVST;
