import { r as registerInstance, j as createEvent, h, g as getElement } from './index-07845439.js';
import { d as dist } from './index-63517df5.js';
import './_commonjsHelpers-8fe71198.js';

const sv = {
  " number": "nummer",
  " reference": "referens",
  customer: "kund",
  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-ig-number-details-h{display:-ms-flexbox;display:flex;width:100%;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:start;justify-content:flex-start;padding:1em;padding-left:4.5em}[hidden].sc-ig-number-details-h{display:none}dt.sc-ig-number-details{font-weight:bold;text-align:left;margin-bottom:.2em}dt.sc-ig-number-details::first-letter{text-transform:capitalize}smoothly-display.sc-ig-number-details,ig-display-edit.sc-ig-number-details{text-align:left;margin:0;width:35%}section.sc-ig-number-details{width:50%}";

const IntergiroNumberDetails = 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.name ? this.t(this.name) : "") + this.t(" number")), this.name == "subscription" ? (h("ig-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.name ? this.t(this.name) + this.t(" ID") : "ID"), h("smoothly-display", null, this.identifier))),
      this.reference && (h("section", null, h("dt", null, (this.name ? this.t(this.name) : "") + this.t(" reference")), h("smoothly-display", null, this.reference))),
    ];
  }
  get element() { return getElement(this); }
};
IntergiroNumberDetails.style = styleCss;

export { IntergiroNumberDetails as ig_number_details };
