import { defineComponent as o, computed as m, toDisplayString as b } from "vue";
import { useI18n as d } from "vue-i18n";
const P = /* @__PURE__ */ o({
  __name: "DatahubDataTypeSimplePricingValueRenderer",
  props: {
    row: {},
    rowIndex: {},
    cell: {},
    cellValue: {},
    dataTypeInstance: {},
    modelValue: {}
  },
  setup(a) {
    const e = a, { t: s } = d(), p = m(() => {
      if (!e.cellValue)
        return "";
      const l = e.cell?.properties?.currency, t = Number(e.cellValue.basePrice);
      let n = t, c = t;
      const r = e.cellValue.bulkPrices ?? [];
      if (Array.isArray(r))
        for (let i = 0; i < r.length; i++)
          Number(r[i].price) > c && (c = Number(r[i].price)), Number(r[i].price) < n && (n = Number(r[i].price));
      return !t || !n || !c ? "" : s("datahub-plugin.simple-pricing-renderer.SimplePricingRenderMessage", {
        basePrice: t,
        currency: l,
        minPrice: n,
        maxPrice: c
      });
    });
    return (l, t) => b(p.value);
  }
});
function u(a) {
  const e = a;
  e.__i18n = e.__i18n || [], e.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "datahub-plugin": {
          "simple-pricing-renderer": {
            SimplePricingRenderMessage: { t: 0, b: { t: 2, i: [{ t: 3, v: "Base price " }, { t: 4, k: "basePrice" }, { t: 3, v: " " }, { t: 4, k: "currency" }, { t: 3, v: "; Price Range " }, { t: 4, k: "minPrice" }, { t: 3, v: "-" }, { t: 4, k: "maxPrice" }, { t: 3, v: " " }, { t: 4, k: "currency" }] } }
          }
        }
      },
      "de-DE": {
        "datahub-plugin": {
          "simple-pricing-renderer": {
            SimplePricingRenderMessage: { t: 0, b: { t: 2, i: [{ t: 3, v: "Grundpreis " }, { t: 4, k: "basePrice" }, { t: 3, v: " " }, { t: 4, k: "currency" }, { t: 3, v: "; Preisspanne " }, { t: 4, k: "minPrice" }, { t: 3, v: "-" }, { t: 4, k: "maxPrice" }, { t: 3, v: " " }, { t: 4, k: "currency" }] } }
          }
        }
      }
    }
  });
}
typeof u == "function" && u(P);
export {
  P as default
};
