import { defineComponent as o, mergeModels as u, useModel as l, watch as r, createBlock as s, openBlock as d } from "vue";
import { _ as m } from "./DatahubDataTypeEditor.vue_vue_type_script_setup_true_lang-Blx83HK-.js";
const c = /* @__PURE__ */ o({
  __name: "ConstToXExtension",
  props: /* @__PURE__ */ u({
    attributeMap: {},
    destinationAttribute: {},
    sourceAttributes: {},
    etlAttributeSetMapId: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(i) {
    const e = l(i, "modelValue");
    return e.value || (e.value = {}), r(
      () => e.value?.constValue,
      (t, a) => {
        t !== a && (e.value = {
          ...e.value,
          value: t
        });
      },
      { immediate: !0 }
    ), (t, a) => (d(), s(m, {
      modelValue: e.value.constValue,
      "onUpdate:modelValue": a[0] || (a[0] = (n) => e.value.constValue = n),
      attribute: t.destinationAttribute,
      "data-type-instance": t.destinationAttribute.dataTypeInstance,
      label: String(t.destinationAttribute.name ?? t.destinationAttribute.id)
    }, null, 8, ["modelValue", "attribute", "data-type-instance", "label"]));
  }
});
export {
  c as default
};
