import { defineComponent as m, mergeModels as r, useModel as d, createBlock as s, openBlock as p, unref as o } from "vue";
import { j as u } from "./start-BYfL32Oe.mjs";
import "vue-i18n";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
import { t as c } from "./TaxClasses-BY8s9nMy.mjs";
const C = /* @__PURE__ */ m({
  __name: "TaxesDataTypeTaxClassEditor",
  props: /* @__PURE__ */ r({
    modelValue: {},
    readOnly: { type: Boolean },
    attribute: {},
    massEditing: { type: Boolean },
    label: {},
    fieldName: {},
    dataTypeInstance: {},
    loading: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(n) {
    const a = d(n, "modelValue");
    function i({ id: e, name: t }) {
      a.value = { id: e, name: t };
    }
    return watch(
      a,
      (e) => {
        e || (a.value = {});
      },
      { immediate: !0 }
    ), (e, t) => {
      var l;
      return p(), s(o(u), {
        data: o(c).getList,
        text: ((l = a.value) == null ? void 0 : l.name) || "",
        readonly: e.readOnly,
        label: e.label,
        "item-title": "name",
        "item-value": "id",
        "prepend-text": "",
        search: "",
        block: "",
        "page-size": "",
        onChange: i
      }, null, 8, ["data", "text", "readonly", "label"]);
    };
  }
});
export {
  C as default
};
