import { defineComponent as i, mergeModels as r, useModel as u, createBlock as m, openBlock as s, unref as t } from "vue";
import { k as p, m as g } from "./start-CE9SawgU.js";
import "vue-i18n";
import "pinia";
import "./header-Bn1EKnBE.js";
const v = /* @__PURE__ */ i({
  __name: "DatahubDataTypeLanguageValueEditor",
  props: /* @__PURE__ */ r({
    modelValue: {},
    readOnly: { type: Boolean },
    attribute: {},
    massEditing: { type: Boolean },
    label: {},
    fieldName: {},
    dataTypeInstance: {},
    loading: { type: Boolean },
    succeeded: { type: Boolean }
  }, {
    modelValue: { default: () => ({}) },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(o) {
    const a = u(o, "modelValue");
    function n(e, { id: l, name_english: d }) {
      a.value = { id: l, name_english: d };
    }
    return (e, l) => (s(), m(t(p), {
      data: t(g).getLanguagesCached,
      text: a.value?.name_english,
      readonly: e.attribute?.configuration?.readOnly || e.readOnly,
      label: e.massEditing ? void 0 : e.label,
      disabled: e.readOnly || e.attribute?.configuration?.readOnly,
      loading: e.loading,
      "item-title": "name",
      "item-value": "id",
      "max-width": "500",
      "page-size": "",
      select: "",
      search: "",
      block: "",
      onEvent: n
    }, null, 8, ["data", "text", "readonly", "label", "disabled", "loading"]));
  }
});
export {
  v as default
};
