require("../../../_virtual/_rolldown/runtime.js");
let react = require("react");
//#region src/components/PisellSteps/hooks/useResponsive.ts
/**
* 响应式监听 Hook
* 监听窗口大小变化，返回当前是否为移动端
* 
* @param breakpoint - 断点宽度（默认 768px）
* @returns 是否为移动端
*/
function useResponsive(breakpoint = 768) {
	const [isMobile, setIsMobile] = (0, react.useState)(typeof window !== "undefined" ? window.innerWidth < breakpoint : false);
	(0, react.useEffect)(() => {
		if (typeof window === "undefined") return;
		const handleResize = () => {
			setIsMobile(window.innerWidth < breakpoint);
		};
		window.addEventListener("resize", handleResize);
		handleResize();
		return () => {
			window.removeEventListener("resize", handleResize);
		};
	}, [breakpoint]);
	return isMobile;
}
//#endregion
exports.useResponsive = useResponsive;
