'use strict';

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

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

const teliaFooterLegalCss = ".telia-footer-legal{color:#ffffff;display:flex;flex-direction:column}@media screen and (min-width: 64em){.telia-footer-legal{align-items:center;flex-direction:row;justify-content:space-between}}.telia-footer-legal__container{padding:0}.telia-footer-legal__copyright-notice{font-family:\"TeliaSans\", Helvetica, Arial, \"Lucida Grande\", sans-serif;font-weight:normal;font-size:calc(1.6rem * var(--voca-rem-multiplier));line-height:1.5;margin-bottom:calc(0.8rem * var(--voca-rem-multiplier))}.telia-footer-legal__content{}.telia-footer-legal__content telia-col:first-of-type{display:flex;flex-direction:column;justify-content:flex-end;margin-bottom:calc(1.6rem * var(--voca-rem-multiplier))}@media screen and (min-width: 37.5em){.telia-footer-legal__content telia-col:first-of-type{margin-bottom:0}}.telia-footer-legal__content ::slotted([slot=contacts]){font-family:\"TeliaSans\", Helvetica, Arial, \"Lucida Grande\", sans-serif;font-weight:normal;font-size:calc(1.4rem * var(--voca-rem-multiplier));line-height:1.5;color:rgba(255, 255, 255, 0.6)}.telia-footer-legal__content ::slotted([slot=additional]){margin-bottom:calc(1.6rem * var(--voca-rem-multiplier))}.telia-footer-legal__content telia-col:last-of-type{display:grid}@media screen and (min-width: 37.5em){.telia-footer-legal__content telia-col:last-of-type{justify-content:flex-end}}.telia-footer-legal__links{align-self:flex-end}.telia-footer-legal__link{font-family:\"TeliaSans\", Helvetica, Arial, \"Lucida Grande\", sans-serif;font-weight:normal;font-size:calc(1.6rem * var(--voca-rem-multiplier));line-height:1.5;width:100%;margin-bottom:calc(0.8rem * var(--voca-rem-multiplier))}@media screen and (min-width: 37.5em){.telia-footer-legal__link{width:auto;margin-bottom:0;margin-right:calc(1.2rem * var(--voca-rem-multiplier))}.telia-footer-legal__link:last-of-type{margin-right:0}}.telia-footer-legal__link:last-of-type{margin-bottom:0}";

const TeliaFooterLegal = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    /** Tracking id is used to identify and count Component usage */
    this.dataTrackingId = 'telia-footer-legal';
    this.classname = 'telia-footer-legal';
  }
  getItems() {
    if (!this.items) {
      return;
    }
    let localItems;
    if (typeof this.items === 'object') {
      localItems = this.items;
    }
    else {
      localItems = JSON.parse(this.items);
    }
    return localItems.map(item => {
      return (index.h("li", { class: `${this.classname}__link` }, index.h("telia-link", { href: item.href, variant: "text", "dark-background": true, "disable-visited": true }, item.name)));
    });
  }
  renderCopyrightNotice() {
    if (this.copyright) {
      return (index.h("div", { class: `${this.classname}__copyright-notice` }, this.copyright));
    }
    return;
  }
  render() {
    return (index.h(index.Host, { class: `${this.classname}`, "data-testid": this.dataTestid }, index.h("telia-grid", { class: `${this.classname}__container` }, index.h("telia-row", { class: `${this.classname}__content` }, index.h("telia-col", { width: 12, "width-md": 6 }, this.renderCopyrightNotice(), index.h("slot", { name: "contacts" })), index.h("telia-col", { width: 12, "width-md": 6 }, index.h("slot", { name: "additional" }), index.h("telia-list", { class: `${this.classname}__links`, "list-tag": "ul", variant: "row" }, this.getItems())))), index.h("telia-vst", { dataTrackingId: this.dataTrackingId })));
  }
};
TeliaFooterLegal.style = teliaFooterLegalCss;

exports.telia_footer_legal = TeliaFooterLegal;
