'use strict';

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

const index$1 = require('./index-0b1e2673.js');
require('./_commonjsHelpers-937cd5b3.js');
const index = require('./index-36cf3884.js');

const sv = {};

function create(language) {
  return index.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) {
    index$1.registerInstance(this, hostRef);
    this.opened = "";
    this.selected = false;
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    let result;
    switch (this.opened) {
      case "number":
        result = (index$1.h("payfunc-number-details", { identifier: this.order.id, number: this.order.number, name: "order" }));
        break;
      case "customer":
        result = index$1.h("payfunc-order-customer", { customer: this.order.customer });
        break;
      case "items":
        result = index$1.h("payfunc-order-items", { order: this.order });
        break;
      case "payment":
        result = index$1.h("payfunc-order-payment", { order: this.order });
        break;
      case "created":
        result = (index$1.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 : [index$1.h("td", { colSpan: 8 }, result)];
  }
  get element() { return index$1.getElement(this); }
};
PayfuncOrdersTableDetails.style = styleCss;

exports.payfunc_orders_table_details = PayfuncOrdersTableDetails;
