import { defineComponent as c, mergeModels as p, useModel as f, computed as b, createBlock as g, openBlock as _, unref as i } from "vue";
import { useI18n as v } from "vue-i18n";
import { a as U } from "./start-CE9SawgU.js";
import "pinia";
import "./header-Bn1EKnBE.js";
import { u as h } from "./units-B2_QriGO.js";
const T = /* @__PURE__ */ c({
  __name: "UnitValueToNumberExtension",
  props: /* @__PURE__ */ p({
    attributeMap: {},
    destinationAttribute: {},
    sourceAttributes: {},
    etlAttributeSetMapId: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = e, u = f(e, "modelValue"), { t: a } = v(), { units: s, isUnitsLoading: m } = h(
      () => t.sourceAttributes?.[0]?.configuration?.dimensionId
    ), d = b(
      () => s.value.map(({ id: l, name: o, symbol: n }) => ({
        value: l,
        title: `${o} (${n})`
      }))
    );
    return (l, o) => (_(), g(i(U), {
      modelValue: u.value.configuredUnitId,
      "onUpdate:modelValue": o[0] || (o[0] = (n) => u.value.configuredUnitId = n),
      items: d.value,
      loading: i(m),
      label: i(a)("datahub-plugin.etl.unit-to-number.unitToConvertTo"),
      "max-width": "567",
      "persistent-placeholder": ""
    }, null, 8, ["modelValue", "items", "loading", "label"]));
  }
});
function r(e) {
  const t = e;
  t.__i18n = t.__i18n || [], t.__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: "Einheit, auf die umgerechnet wird" } }
            }
          }
        }
      }
    }
  });
}
typeof r == "function" && r(T);
export {
  T as default
};
