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

exports.payfunc_number_details = PayfuncNumberDetails;
