'use strict';

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

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

const sv = {
  details: "detaljer",
  "excluding VAT": "exklusive moms",
};

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

const styleCss = ".sc-payfunc-items-display-h{display:block}[hidden].sc-payfunc-items-display-h{display:none}.sc-payfunc-items-display-h>*.sc-payfunc-items-display{text-align:center;margin-bottom:1em}.sc-payfunc-items-display-h>section.sc-payfunc-items-display>smoothly-display.sc-payfunc-items-display{font-size:140%}.sc-payfunc-items-display-h>details.sc-payfunc-items-display>summary.sc-payfunc-items-display{list-style-image:none}";

const PayfuncItemsDisplay = class {
  constructor(hostRef) {
    index$1.registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    const t = this.t;
    const vat = index$2.Item.vat(this.items);
    return [
      index$1.h("details", null, index$1.h("summary", null, t("details")), index$1.h("section", null, index$1.h("payfunc-items-list", { items: this.items, currency: this.currency }))),
      index$1.h("section", null, index$1.h("smoothly-display", { type: "price", value: index$2.Item.amount(this.items), currency: this.currency }), vat != undefined ? (index$1.h("p", { style: { fontSize: "90%", margin: "0" } }, "(", index$1.h("smoothly-display", { style: { display: "inline" }, type: "price", value: index$2.Item.amount(this.items) - vat, currency: this.currency }), "\u00A0", t("excluding VAT"), ")")) : ([])),
    ];
  }
  get element() { return index$1.getElement(this); }
};
PayfuncItemsDisplay.style = styleCss;

exports.payfunc_items_display = PayfuncItemsDisplay;
