import * as React from "react";
//#region src/hooks/use-mobile.ts
var MOBILE_BREAKPOINT = 768;
function useIsMobile() {
	const [isMobile, setIsMobile] = React.useState(false);
	React.useEffect(() => {
		const mql = window.matchMedia(`(max-width: 767px)`);
		const onChange = (e) => {
			setIsMobile(e.matches);
		};
		onChange(mql);
		if (mql.addEventListener) mql.addEventListener("change", onChange);
		else if ("addListener" in mql) mql.addListener(onChange);
		return () => {
			if (mql.removeEventListener) mql.removeEventListener("change", onChange);
			else if ("removeListener" in mql) mql.removeListener(onChange);
		};
	}, []);
	return isMobile;
}
//#endregion
export { MOBILE_BREAKPOINT, useIsMobile };

//# sourceMappingURL=index471.js.map