import { defineComponent as m, mergeModels as u, useModel as r, computed as d, createBlock as c, openBlock as f, unref as v, mergeProps as y } from "vue";
import { j as g, a5 as B } from "./start-BYfL32Oe.mjs";
import "vue-i18n";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
const _ = /* @__PURE__ */ m({
  __name: "SettingCombobox",
  props: /* @__PURE__ */ u({
    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(l) {
    const t = l, i = r(l, "modelValue");
    r(l, "valid");
    async function s(a) {
      var e, o;
      return (e = t.options) != null && e.remote ? await B((o = t.options) == null ? void 0 : o.remote, a) : [];
    }
    const p = d(() => {
      var a, e, o, n;
      return {
        select: !0,
        block: !0,
        search: !0,
        itemTitle: (a = t.options) == null ? void 0 : a.displayField,
        itemValue: (e = t.options) == null ? void 0 : e.valueField,
        text: i.value ?? ((o = t.options) == null ? void 0 : o.label),
        data: ((n = t.options) == null ? void 0 : n.items) ?? s
      };
    });
    return (a, e) => (f(), c(v(g), y(p.value, {
      onChange: e[0] || (e[0] = (o) => i.value = o)
    }), null, 16));
  }
});
export {
  _
};
