import { useRef as n, useEffect as i } from "react";
function u(t) {
  const e = n(null);
  return i(() => {
    if (!e.current)
      return;
    const r = () => {
      t(e.current.scrollWidth > e.current.clientWidth);
    };
    return r(), window.addEventListener("resize", r), () => {
      window.removeEventListener("resize", r);
    };
  }, [t]), e;
}
export {
  u
};
