import { defineComponent as d, mergeModels as r, useModel as u, createBlock as m, openBlock as s, unref as t } from "vue";
import { k as p, l as c } from "./start-CE9SawgU.js";
import "vue-i18n";
import "pinia";
import "./header-Bn1EKnBE.js";
const B = /* @__PURE__ */ d({
  __name: "DatahubDataTypeCurrencyValueEditor",
  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: i }) {
      a.value = { id: l, name: i };
    }
    return (e, l) => (s(), m(t(p), {
      data: t(c).listCurrencies,
      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": "id",
      "max-width": "500",
      "page-size": "",
      select: "",
      search: "",
      block: "",
      onEvent: n
    }, null, 8, ["data", "text", "readonly", "label", "disabled", "loading"]));
  }
});
export {
  B as default
};
