import { defineComponent as m, mergeModels as p, useModel as g, createElementBlock as c, openBlock as f, createVNode as y, unref as r } from "vue";
import { j as b, m as _, l as v } from "./start-BYfL32Oe.mjs";
import "vue-i18n";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
const h = { class: "extension-config" }, V = /* @__PURE__ */ m({
  __name: "DatahubDataTypeLanguageValueEditor",
  props: /* @__PURE__ */ p({
    modelValue: {},
    readOnly: { type: Boolean },
    attribute: {},
    massEditing: { type: Boolean },
    label: {},
    fieldName: {},
    dataTypeInstance: {},
    loading: { type: Boolean }
  }, {
    modelValue: { default: () => ({}) },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(s) {
    const t = g(s, "modelValue");
    function u(e, { id: l, name_english: a }) {
      t.value = { id: l, name_english: a };
    }
    return (e, l) => {
      var a, o, n, i, d;
      return f(), c("div", h, [
        y(r(b), {
          data: r(_).getLanguagesCached,
          text: (a = t.value) == null ? void 0 : a.name_english,
          readonly: ((n = (o = e.attribute) == null ? void 0 : o.configuration) == null ? void 0 : n.readOnly) || e.readOnly,
          label: e.massEditing ? void 0 : e.label,
          disabled: e.readOnly || ((d = (i = e.attribute) == null ? void 0 : i.configuration) == null ? void 0 : d.readOnly),
          loading: e.loading,
          "item-title": "name",
          "item-value": "id",
          "page-size": "",
          select: "",
          search: "",
          block: "",
          onEvent: u
        }, null, 8, ["data", "text", "readonly", "label", "disabled", "loading"])
      ]);
    };
  }
}), T = /* @__PURE__ */ v(V, [["__scopeId", "data-v-f90342ce"]]);
export {
  T as default
};
