'use strict';

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

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

const sv = {
  Name: "Namn",
  Email: "Mail",
  Phone: "Telefon",
  "There is no customer information available.": "Det finns ingen kundinformation tillgänglig.",
};

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

const styleCss = ".sc-payfunc-order-customer-h{display:flex;width:100%;flex-direction:row;justify-content:flex-start;padding:1em;padding-left:4.5em}[hidden].sc-payfunc-order-customer-h{display:none}dt.sc-payfunc-order-customer{font-weight:bold;text-align:left;margin-bottom:.2em}dt.sc-payfunc-order-customer::first-letter{text-transform:capitalize}section.sc-payfunc-order-customer{width:30%}section.sc-payfunc-order-customer>dt.sc-payfunc-order-customer+*.sc-payfunc-order-customer{width:70%}";

const PayfuncOrderCustomer = class {
  constructor(hostRef) {
    index$1.registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    return !this.customer || Object.values(this.customer).length < 1 ? (index$1.h("p", null, this.t("There is no customer information available."))) : ([
      this.customer.name && (index$1.h("section", null, index$1.h("dt", null, this.t("Name")), index$1.h("smoothly-display", { type: "text", value: index$2.Name.get(this.customer.name) }))),
      this.customer.email && (index$1.h("section", null, index$1.h("dt", null, this.t("Email")), index$1.h("payfunc-email-addresses", { editable: false, value: this.customer.email }))),
      this.customer.phone && (index$1.h("section", null, index$1.h("dt", null, this.t("Phone")), index$1.h("payfunc-phone-numbers", { editable: false, value: this.customer.phone }))),
    ]);
  }
  get element() { return index$1.getElement(this); }
};
PayfuncOrderCustomer.style = styleCss;

exports.payfunc_order_customer = PayfuncOrderCustomer;
