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

const sv = {
  " number": "nummer",
  " reference": "referens",
  account: "konto",
  order: "order",
  subscription: "prenumerations",
  " ID": "-ID",
  "Updating subscription number...": "Uppdaterar prenumerationsnummer...",
  "Failed to update subscription number.": "Kunde inte uppdatera prenumerationsnummer.",
  "Updated subscription number.": "Prenummerationsnummer uppdaterat.",
};

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

const styleCss = ".sc-payfunc-number-details-h{display:flex;width:100%;flex-direction:row;justify-content:flex-start;padding:1em;padding-left:4.5em}[hidden].sc-payfunc-number-details-h{display:none}dt.sc-payfunc-number-details{font-weight:bold;text-align:left;margin-bottom:.2em}dt.sc-payfunc-number-details::first-letter{text-transform:capitalize}smoothly-display.sc-payfunc-number-details,payfunc-display-edit.sc-payfunc-number-details{text-align:left;margin:0;width:35%}section.sc-payfunc-number-details{width:50%}";

const PayfuncNumberDetails = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.numberUpdated = createEvent(this, "numberUpdated", 7);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    return [
      this.number && (h("section", null, h("dt", null, this.t(this.name), this.t(" number")), this.name == "subscription" ? (h("payfunc-display-edit", { name: "number", value: this.number, onChanged: (e) => this.numberUpdated.emit(e.detail) })) : (h("smoothly-display", null, this.number)))),
      this.identifier && (h("section", null, h("dt", null, this.t(this.name), this.t(" ID")), h("smoothly-display", null, this.identifier))),
      this.reference && (h("section", null, h("dt", null, this.t(this.name), this.t(" reference")), h("smoothly-display", null, this.reference))),
    ];
  }
  get element() { return getElement(this); }
};
PayfuncNumberDetails.style = styleCss;

export { PayfuncNumberDetails as payfunc_number_details };
