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

const sv = {};

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

const styleCss = ".sc-payfunc-orders-table-details-h{display:table-row}.sc-payfunc-orders-table-details-h>.sc-payfunc-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 PayfuncOrdersTableDetails = 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("payfunc-number-details", { identifier: this.order.id, number: this.order.number, name: "order" }));
        break;
      case "customer":
        result = h("payfunc-order-customer", { customer: this.order.customer });
        break;
      case "items":
        result = h("payfunc-order-items", { order: this.order });
        break;
      case "payment":
        result = h("payfunc-order-payment", { order: this.order });
        break;
      case "created":
        result = (h("payfunc-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); }
};
PayfuncOrdersTableDetails.style = styleCss;

export { PayfuncOrdersTableDetails as payfunc_orders_table_details };
