import { defineComponent as r, mergeModels as u, useModel as s, watch as m, createElementBlock as c, openBlock as o, createBlock as p, createCommentVNode as y, unref as l } from "vue";
import { k as f, n as g, o as b } from "./start-CE9SawgU.js";
import "vue-i18n";
import "pinia";
import "./header-Bn1EKnBE.js";
const v = { class: "extension-config" }, _ = /* @__PURE__ */ r({
  __name: "DatahubDataTypeCountryValueEditor",
  props: /* @__PURE__ */ u({
    modelValue: {},
    readOnly: { type: Boolean },
    attribute: {},
    massEditing: { type: Boolean },
    label: {},
    fieldName: {},
    dataTypeInstance: {},
    loading: { type: Boolean },
    succeeded: { type: Boolean }
  }, {
    modelValue: { default: () => ({}) },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(n) {
    const a = s(n, "modelValue");
    function d(e, { code3digit: t, name: i }) {
      a.value = { code3digit: t, name: i };
    }
    return m(a, (e) => {
      e || (a.value = {});
    }), (e, t) => (o(), c("div", v, [
      a.value ? (o(), p(l(f), {
        key: 0,
        data: l(g).getCountriesCached,
        text: a.value.name,
        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": "code3digit",
        "page-size": "",
        select: "",
        search: "",
        block: "",
        onEvent: d
      }, null, 8, ["data", "text", "readonly", "label", "disabled", "loading"])) : y("", !0)
    ]));
  }
}), E = /* @__PURE__ */ b(_, [["__scopeId", "data-v-948e0211"]]);
export {
  E as default
};
