'use strict';

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

const index = require('./index-0b1e2673.js');
require('./_commonjsHelpers-937cd5b3.js');
const index$1 = require('./index-36cf3884.js');

const en = {
  "By clicking the $0 button I accept the terms and conditions ($1).": (buttonName, url) => [
    "By clicking the " + buttonName + " button I accept the ",
    index.h("a", { href: url }, "terms and conditions"),
    ".",
  ],
};

const sv = {
  "By clicking the $0 button I accept the terms and conditions ($1).": (buttonName, url) => [
    "Genom att klicka på " + buttonName + "-knappen godkänner jag ",
    index.h("a", { href: url }, "villkoren"),
    ".",
  ],
};

function create(language) {
  return index$1.dist.create({
    sv,
    en,
  }, language);
}

const styleCss = ".sc-merchant-terms-h{display:block}[hidden].sc-merchant-terms-h{display:none}.sc-merchant-terms-h>p.sc-merchant-terms{font-size:smaller;text-align:center}";

const MerchantTerms = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    const t = this.t;
    return [
      index.h("p", null, !this.merchant
        ? ""
        : this.merchant.terms
          ? t("By clicking the $0 button I accept the terms and conditions ($1).", this.buttonName, this.merchant.terms)
          : ""),
    ];
  }
  get element() { return index.getElement(this); }
};
MerchantTerms.style = styleCss;

exports.merchant_terms = MerchantTerms;
