import { r as registerInstance, h, g as getElement } from './index-07845439.js';
import { I as Item } from './index-e20749b7.js';
import { d as dist } from './index-63517df5.js';
import './index-b6cf748e.js';
import './_commonjsHelpers-8fe71198.js';
import './index-265fba1f.js';

const sv = {
  Qty: "Antal",
  Name: "Namn",
  Price: "Pris",
  VAT: "Moms",
  Total: "Totalt",
  Status: "Status",
};

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

const styleCss = ".sc-ig-order-items-h{display:inline-block}[hidden].sc-ig-order-items-h{display:none}.sc-ig-order-items-h>table.sc-ig-order-items{table-layout:fixed;width:100%}.sc-ig-order-items-h>table.sc-ig-order-items>tr.sc-ig-order-items>th.sc-ig-order-items{text-align:left;padding-top:0.4em;padding-bottom:0.5em}.sc-ig-order-items-h>table.sc-ig-order-items>tr.sc-ig-order-items>th.wide.sc-ig-order-items{width:20%}.sc-ig-order-items-h>table.sc-ig-order-items>tr.sc-ig-order-items>th.status.sc-ig-order-items{width:19%;max-width:20em}";

const IntergiroOrderItems = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.quantityStatus = false;
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  handleQuantityStatus(event) {
    this.quantityStatus = true;
  }
  render() {
    const t = this.t;
    return [
      h("table", null, h("tr", null, h("th", null, this.quantityStatus ? t("Qty") : ""), h("th", { class: "wide" }, this.quantityStatus ? t("Name") : ""), h("th", null, this.quantityStatus ? t("Price") : ""), h("th", null, this.quantityStatus ? t("VAT") : ""), h("th", null, t("Total")), h("th", { class: "status" }, t("Status"))), typeof this.order.items === "number"
        ? []
        : Item.asArray(this.order.items).map((item, index) => (h("ig-order-items-quantity", { order: this.order.id, currency: this.order.currency, item: item }))), h("ig-order-items-total", { currency: this.order.currency, items: this.order.items })),
    ];
  }
  get element() { return getElement(this); }
};
IntergiroOrderItems.style = styleCss;

export { IntergiroOrderItems as ig_order_items };
