let c = 0;
function r(e, o = {}) {
  const {
    preventScroll: s = !1,
    cancelPrevious: t = !0,
    sync: a = !1
  } = o;
  t && cancelAnimationFrame(c);
  const n = () => e == null ? void 0 : e.focus({
    preventScroll: s
  });
  a ? n() : c = requestAnimationFrame(n);
}
export {
  r as enqueueFocus
};
