import { h, r as registerInstance, g as getElement } from './index-aeac5cad.js';
import './_commonjsHelpers-91fffb88.js';
import { d as dist } from './index-fdd60c34.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 ",
    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 ",
    h("a", { href: url }, "villkoren"),
    ".",
  ],
};

function create(language) {
  return 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) {
    registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    const t = this.t;
    return [
      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 getElement(this); }
};
MerchantTerms.style = styleCss;

export { MerchantTerms as merchant_terms };
