'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 = {};

function create(language) {
  return index.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) {
    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("ig-number-details", { identifier: this.order.id, number: this.order.number, name: "order" }));
        break;
      case "contact":
        result = (index$1.h("ig-order-contact", { contact: index$2.Contact.is(this.order.customer) ? this.order.customer : undefined }));
        break;
      case "items":
        result = index$1.h("ig-order-items", { order: this.order });
        break;
      case "payment":
        result = index$1.h("ig-order-payment", { order: this.order });
        break;
      case "created":
        result = (index$1.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 : [index$1.h("td", { colSpan: 8 }, result)];
  }
  get element() { return index$1.getElement(this); }
};
IntergiroOrdersTableDetails.style = styleCss;

exports.ig_orders_table_details = IntergiroOrdersTableDetails;
