import { defineComponent as r, mergeModels as d, useModel as i, watch as m, createBlock as p, openBlock as s, unref as o } from "vue";
import { k as u } from "./start-CE9SawgU.js";
import "vue-i18n";
import "pinia";
import "./header-Bn1EKnBE.js";
import { t as c } from "./TaxZones-BAyb9A2u.js";
const B = /* @__PURE__ */ r({
  __name: "TaxesDataTypeTaxZoneEditor",
  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(l) {
    const a = i(l, "modelValue");
    function n({ id: e, name: t }) {
      a.value = { id: e, name: t };
    }
    return m(
      a,
      (e) => {
        e || (a.value = {});
      },
      { immediate: !0 }
    ), (e, t) => (s(), p(o(u), {
      data: o(c).getList,
      text: a.value?.name || "",
      readonly: e.readOnly,
      label: e.label,
      "prepend-text": "",
      search: "",
      block: "",
      "page-size": "",
      onChange: n
    }, null, 8, ["data", "text", "readonly", "label"]));
  }
});
export {
  B as default
};
