import { ref as n } from "vue";
const e = n([]), r = (o) => {
  const l = n(0), t = e.value.find(({ id: u }) => u == o);
  return t != null ? l.value = e.value.indexOf(t) : (e.value.push({
    id: o,
    text: ""
  }), l.value = e.value.length - 1), { getModel: () => e.value[l.value] };
};
export {
  r as useSearchModel
};
