import { useRef as f, useEffect as i } from "react";
function o(u, r = 50) {
  const e = f(null);
  return i(() => {
    let t;
    return u && (t = setTimeout(() => {
      e.current && e.current.focus();
    }, r)), () => {
      t && clearTimeout(t);
    };
  }, [u, r]), e;
}
export {
  o as default
};
//# sourceMappingURL=useAutoFocus.js.map
