import { r as registerInstance, h, g as getElement } from './index-07845439.js';
import { b as Contact } 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 = {};

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

const styleCss = ".sc-ig-orders-table-details-h{display:table-row}.sc-ig-orders-table-details-h>.sc-ig-orders-table-details:nth-child(1){border-top:solid 1px rgb(var(--smoothly-medium-shade));border-bottom:solid 1px rgb(var(--smoothly-medium-shade));background-color:rgb(var(--smoothly-dark-shade));padding-top:0.5em;padding-bottom:0.5em;padding-left:5%}";

const IntergiroOrdersTableDetails = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.opened = "";
    this.selected = false;
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    let result;
    switch (this.opened) {
      case "number":
        result = (h("ig-number-details", { identifier: this.order.id, number: this.order.number, name: "order" }));
        break;
      case "contact":
        result = (h("ig-order-contact", { contact: Contact.is(this.order.customer) ? this.order.customer : undefined }));
        break;
      case "items":
        result = h("ig-order-items", { order: this.order });
        break;
      case "payment":
        result = h("ig-order-payment", { order: this.order });
        break;
      case "created":
        result = (h("ig-order-events", { event: this.order.event, currency: this.order.currency, payment: this.order.payment }));
        break;
      default:
        result = [];
        break;
    }
    return Array.isArray(result) && result.length == 0 ? result : [h("td", { colSpan: 8 }, result)];
  }
  get element() { return getElement(this); }
};
IntergiroOrdersTableDetails.style = styleCss;

export { IntergiroOrdersTableDetails as ig_orders_table_details };
