import { ref, onBeforeUpdate } from 'vue';

const useRefs = () => {
  const refs = ref(/* @__PURE__ */ new Map());
  const setRef = (key) => (el) => {
    refs.value.set(key, el);
  };
  onBeforeUpdate(() => {
    refs.value = /* @__PURE__ */ new Map();
  });
  return [setRef, refs];
};

export { useRefs };
//# sourceMappingURL=useRefs.mjs.map
