import { r as registerInstance, h, g as getElement } from './index-aeac5cad.js';
import './_commonjsHelpers-91fffb88.js';
import { N as Name } from './index-ec2a4942.js';
import { d as dist } from './index-fdd60c34.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 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) {
    registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    return !this.customer || Object.values(this.customer).length < 1 ? (h("p", null, this.t("There is no customer information available."))) : ([
      this.customer.name && (h("section", null, h("dt", null, this.t("Name")), h("smoothly-display", { type: "text", value: Name.get(this.customer.name) }))),
      this.customer.email && (h("section", null, h("dt", null, this.t("Email")), h("payfunc-email-addresses", { editable: false, value: this.customer.email }))),
      this.customer.phone && (h("section", null, h("dt", null, this.t("Phone")), h("payfunc-phone-numbers", { editable: false, value: this.customer.phone }))),
    ]);
  }
  get element() { return getElement(this); }
};
PayfuncOrderCustomer.style = styleCss;

export { PayfuncOrderCustomer as payfunc_order_customer };
