import { useState as r, useEffect as u } from "react";
import { useWindowKeyPress as c } from "./useWindowKeyPress.js";
function f(s) {
  const [t, e] = r(!1), o = c("Tab");
  return u(() => {
    s.current === document.activeElement ? e(!0) : e(!1);
  }, [o]), { hasFocus: t, setHasFocus: e };
}
export {
  f as useHasFocus
};
