import { defineComponent as p, mergeModels as c, useModel as f, computed as b, createBlock as g, openBlock as _, unref as u } from "vue";
import { useI18n as v } from "vue-i18n";
import { h as U } from "./start-BYfL32Oe.mjs";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
import { u as T } from "./units-DogXJCIC.mjs";
const V = /* @__PURE__ */ p({
  __name: "UnitValueToNumberExtension",
  props: /* @__PURE__ */ c({
    attributeMap: {},
    destinationAttribute: {},
    sourceAttributes: {},
    etlAttributeSetMapId: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(i) {
    const o = i, r = f(i, "modelValue"), { t: a } = v(), { units: s, isUnitsLoading: m } = T(
      () => {
        var n, t, e;
        return (e = (t = (n = o.sourceAttributes) == null ? void 0 : n[0]) == null ? void 0 : t.configuration) == null ? void 0 : e.dimensionId;
      }
    ), d = b(
      () => s.value.map(({ id: n, name: t, symbol: e }) => ({
        value: n,
        title: `${t} (${e})`
      }))
    );
    return (n, t) => (_(), g(u(U), {
      modelValue: r.value.configuredUnitId,
      "onUpdate:modelValue": t[0] || (t[0] = (e) => r.value.configuredUnitId = e),
      items: d.value,
      loading: u(m),
      label: u(a)("datahub-plugin.etl.unit-to-number.unitToConvertTo"),
      "persistent-placeholder": ""
    }, null, 8, ["modelValue", "items", "loading", "label"]));
  }
});
function l(i) {
  const o = i;
  o.__i18n = o.__i18n || [], o.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "datahub-plugin": {
          etl: {
            "unit-to-number": {
              unitToConvertTo: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Unit to convert to" } }
            }
          }
        }
      },
      "de-DE": {
        "datahub-plugin": {
          etl: {
            "unit-to-number": {
              unitToConvertTo: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Wert umrechen auf" } }
            }
          }
        }
      }
    }
  });
}
typeof l == "function" && l(V);
export {
  V as default
};
