import { defineComponent as i, mergeModels as m, useModel as d, createBlock as p, openBlock as s, unref as l } 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 "./TaxZones-DQi5U-g7.mjs";
const T = /* @__PURE__ */ i({
  __name: "TaxesDataTypeTaxZoneEditor",
  props: /* @__PURE__ */ m({
    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 r({ id: e, name: t }) {
      a.value = { id: e, name: t };
    }
    return watch(
      a,
      (e) => {
        e || (a.value = {});
      },
      { immediate: !0 }
    ), (e, t) => {
      var o;
      return s(), p(l(u), {
        data: l(c).getList,
        text: ((o = a.value) == null ? void 0 : o.name) || "",
        readonly: e.readOnly,
        label: e.label,
        "prepend-text": "",
        search: "",
        block: "",
        "page-size": "",
        onChange: r
      }, null, 8, ["data", "text", "readonly", "label"]);
    };
  }
});
export {
  T as default
};
