import { r as registerInstance, h, g as getElement } from './index-aeac5cad.js';
import './_commonjsHelpers-91fffb88.js';
import { I as Item } from './index-df45deab.js';
import { d as dist } from './index-fdd60c34.js';

const sv = {
  "Order total": "Orderbelopp",
};

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

const styleCss = ".sc-payfunc-order-items-total-h{display:table-row;width:100%}[hidden].sc-payfunc-order-items-total-h{display:none}.sc-payfunc-order-items-total-h>td.sc-payfunc-order-items-total>div.sc-payfunc-order-items-total{vertical-align:middle;width:fit-content;padding-top:0.2em;padding-left:0.15em;padding-right:0.15em}.sc-payfunc-order-items-total-h>td.sc-payfunc-order-items-total>div.total.sc-payfunc-order-items-total{border-top:solid 1px rgb(var(--smoothly-light-color));width:6em}";

const PayfuncOrderItemsTotal = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    var _a;
    const t = this.t;
    return [
      h("td", null),
      h("td", null, h("div", null, t("Order total"))),
      h("td", null),
      Item.vat(this.items) ? (h("td", null, h("div", { class: "total" }, (_a = Item.vat(this.items)) === null || _a === void 0 ? void 0 : _a.toFixed(2)))) : (h("td", null, h("div", null))),
      h("td", null, h("div", { class: "total" }, Item.amount(this.items).toFixed(2), " ", this.currency)),
      h("td", null),
    ];
  }
  get element() { return getElement(this); }
};
PayfuncOrderItemsTotal.style = styleCss;

export { PayfuncOrderItemsTotal as payfunc_order_items_total };
