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