import { defineComponent as p, mergeModels as m, useModel as i, computed as u, createBlock as d, openBlock as c, unref as f, mergeProps as v } from "vue";
import { k as y, ad as g } from "./start-CE9SawgU.js";
import "vue-i18n";
import "pinia";
import "./header-Bn1EKnBE.js";
const M = /* @__PURE__ */ p({
  __name: "SettingCombobox",
  props: /* @__PURE__ */ m({
    modelValue: {},
    data: {},
    options: {},
    settings: {},
    loading: { type: Boolean },
    readonly: { type: Boolean },
    isDefault: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {},
    valid: { type: Boolean, default: !0 },
    validModifiers: {}
  }),
  emits: ["update:modelValue", "update:valid"],
  setup(o) {
    const e = o, t = i(o, "modelValue");
    i(o, "valid");
    async function n(a) {
      return e.options?.remote ? await g(e.options?.remote, a) : [];
    }
    const s = u(() => ({
      select: !0,
      block: !0,
      search: !0,
      itemTitle: e.options?.displayField,
      itemValue: e.options?.valueField,
      text: t.value ?? e.options?.label,
      data: e.options?.items ?? n
    }));
    return (a, l) => (c(), d(f(y), v(s.value, {
      onChange: l[0] || (l[0] = (r) => t.value = r)
    }), null, 16));
  }
});
export {
  M as _
};
