import { useState as s, useEffect as u } from "react";
const i = 640, r = 1280;
function w() {
  const [o, n] = s(() => {
    if (typeof window > "u")
      return 1;
    const e = window.innerWidth;
    return e >= r ? 3 : e >= i ? 2 : 1;
  });
  return u(() => {
    const e = () => {
      const t = window.innerWidth;
      t >= r ? n(3) : t >= i ? n(2) : n(1);
    };
    return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
  }, []), o;
}
export {
  w as useColumns
};
