'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index$1 = require('./index-df541290.js');
const index = require('./index-b7493032.js');
require('./_commonjsHelpers-10109b76.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 index.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) {
    index$1.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 index$1.getElement(this); }
};
IntergiroStatus.style = styleCss;

exports.ig_status = IntergiroStatus;
