'use client';

import { useEffect, useState } from "react";

//#region src/hooks/useScreenWidth.ts
const useScreenWidth = () => {
	const [screenWidth, setScreenWith] = useState(0);
	useEffect(() => {
		const handleResize = () => {
			setScreenWith(window.innerWidth);
		};
		handleResize();
		window.addEventListener("resize", handleResize, { passive: true });
		return () => window.removeEventListener("resize", handleResize);
	}, []);
	return { screenWidth };
};

//#endregion
export { useScreenWidth };
//# sourceMappingURL=useScreenWidth.mjs.map