import { defineComponent as m, mergeModels as p, useModel as c, createElementBlock as y, openBlock as f, createVNode as b, unref as d } from "vue";
import { j as g, k as v, l as _ } from "./start-BYfL32Oe.mjs";
import "vue-i18n";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
const V = { class: "extension-config" }, E = /* @__PURE__ */ m({
  __name: "DatahubDataTypeCurrencyValueEditor",
  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 = c(s, "modelValue");
    function u(e, { id: o, name: a }) {
      t.value = { id: o, name: a };
    }
    return (e, o) => {
      var a, l, n, i, r;
      return f(), y("div", V, [
        b(d(g), {
          data: d(v).listCurrencies,
          text: (a = t.value) == null ? void 0 : a.name,
          readonly: ((n = (l = e.attribute) == null ? void 0 : l.configuration) == null ? void 0 : n.readOnly) || e.readOnly,
          label: e.massEditing ? void 0 : e.label,
          disabled: e.readOnly || ((r = (i = e.attribute) == null ? void 0 : i.configuration) == null ? void 0 : r.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__ */ _(E, [["__scopeId", "data-v-17a899a3"]]);
export {
  T as default
};
