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

const sv = {
  created: "skapad",
  ordered: "beställd",
  cancelled: "avbruten",
  charged: "godkänd",
  paid: "betald",
  refunded: "återbetald",
  denied: "nekad",
  pending: "väntande",
  deferred: "skickad",
  active: "aktiv",
  inactive: "inaktiv",
  suspended: "avstängd",
  settled: "utbetald",
  authorized: "auktoriserad",
  failed: "misslyckad",
};

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

const styleCss = ".sc-ig-status-h{display:inline-block;position:relative;top:.2em;padding:.2em .3em;border-radius:.6em;overflow:hidden;text-align:center;text-overflow:ellipsis;width:100%}[hidden].sc-ig-status-h{display:none}[status = \"failed\"].sc-ig-status-h,[status = \"suspended\"].sc-ig-status-h,[status = \"denied\"].sc-ig-status-h{background-color:rgb(var(--smoothly-danger-color));color:rgb(var(--smoothly-danger-contrast))}[status=\"authorized\"].sc-ig-status-h,[status = \"active\"].sc-ig-status-h,[status = \"ordered\"].sc-ig-status-h{background-color:rgb(var(--smoothly-success-color));color:rgb(var(--smoothly-success-contrast))}[status = \"inactive\"].sc-ig-status-h,[status = \"cancelled\"].sc-ig-status-h,[status = \"refunded\"].sc-ig-status-h{background-color:rgb(var(--smoothly-medium-color));color:rgb(var(--smoothly-medium-contrast))}[status=\"created\"].sc-ig-status-h,[status=\"deferred\"].sc-ig-status-h,[status=\"pending\"].sc-ig-status-h{background-color:rgb(var(--smoothly-warning-color));color:rgb(var(--smoothly-warning-contrast))}[status = \"charged\"].sc-ig-status-h,[status = \"paid\"].sc-ig-status-h{background-color:rgb(var(--smoothly-tertiary-tint));color:rgb(var(--smoothly-success-contrast))}[status = \"settled\"].sc-ig-status-h{background-color:rgb(var(--smoothly-tertiary-color));color:rgb(var(--smoothly-tertiary-contrast))}";

const IntergiroStatus = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    var _a, _b;
    const t = this.t;
    return [(_a = this.quantity) === null || _a === void 0 ? void 0 : _a.toString(), this.quantity && ((_b = this.unit) !== null && _b !== void 0 ? _b : "×"), t(this.status)].filter(e => e).join(" ");
  }
  get element() { return getElement(this); }
};
IntergiroStatus.style = styleCss;

export { IntergiroStatus as ig_status };
