'use strict';

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

const index$1 = require('./index-df541290.js');
const index$2 = require('./index-c12b8888.js');
const index = require('./index-b7493032.js');
require('./index-0b6f1dd9.js');
require('./_commonjsHelpers-10109b76.js');
require('./index-fe328b96.js');

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

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

exports.ig_order_items = IntergiroOrderItems;
