import { defineComponent as v, mergeModels as V, useModel as h, computed as x, watch as M, onBeforeMount as T, createElementBlock as _, createCommentVNode as r, openBlock as i, createVNode as m, createBlock as y, unref as t } from "vue";
import { useI18n as k } from "vue-i18n";
import { storeToRefs as w } from "pinia";
import { e as B, a as s, o as I } from "./start-CE9SawgU.js";
import "./header-Bn1EKnBE.js";
import { u as E } from "./dataTypes-DocW2t0g.js";
import { b as d } from "./number-to-tree.json_vue_type_i18n_index_0_src_true_lang-BH4ZonZZ.js";
const L = {
  key: 0,
  class: "extension-config d-flex flex-wrap"
}, p = /* @__PURE__ */ v({
  __name: "TreeToTreeExtension",
  props: /* @__PURE__ */ V({
    attributeMap: {},
    destinationAttribute: {},
    sourceAttributes: {},
    etlAttributeSetMapId: {}
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(c) {
    const e = h(c, "modelValue"), { t: l } = k(), u = E(), { languages: f, isLanguagesLoading: g } = w(u), b = x(() => [
      {
        value: "key",
        title: l("datahub-plugin.etl.number-to-tree.Key")
      },
      {
        value: "title",
        title: l("datahub-plugin.etl.number-to-tree.Title")
      }
    ]);
    return M(
      e,
      (n) => {
        n || (e.value = { create: !1, matchMode: "", language: "" });
      },
      { immediate: !0 }
    ), T(u.ensureLanguages), (n, a) => e.value ? (i(), _("div", L, [
      m(t(B), {
        modelValue: e.value.create,
        "onUpdate:modelValue": a[0] || (a[0] = (o) => e.value.create = o),
        label: t(l)("datahub-plugin.etl.number-to-tree.CreateNodeIfNotExisting"),
        "max-width": "567"
      }, null, 8, ["modelValue", "label"]),
      m(t(s), {
        modelValue: e.value.matchMode,
        "onUpdate:modelValue": a[1] || (a[1] = (o) => e.value.matchMode = o),
        items: b.value,
        label: t(l)("datahub-plugin.etl.number-to-tree.MatchBy"),
        "max-width": "567",
        "persistent-placeholder": ""
      }, null, 8, ["modelValue", "items", "label"]),
      e.value.matchMode === "title" ? (i(), y(t(s), {
        key: 0,
        modelValue: e.value.language,
        "onUpdate:modelValue": a[2] || (a[2] = (o) => e.value.language = o),
        items: t(f),
        loading: t(g),
        label: t(l)("datahub-plugin.etl.number-to-tree.RelevantLocale"),
        "item-title": "description",
        "item-value": "key",
        "max-width": "567",
        "persistent-placeholder": ""
      }, null, 8, ["modelValue", "items", "loading", "label"])) : r("", !0)
    ])) : r("", !0);
  }
});
typeof d == "function" && d(p);
const D = /* @__PURE__ */ I(p, [["__scopeId", "data-v-7cd27160"]]);
export {
  D as default
};
