import { useEffect, useState } from "react";

//#region src/core/vuiProvider/useOfflineMode.ts
const useOfflineMode = () => {
	const [isOffline, setIsOffline] = useState(false);
	const setOnline = () => setIsOffline(false);
	const setOffline = () => setIsOffline(true);
	useEffect(() => {
		window.addEventListener("online", setOnline);
		window.addEventListener("offline", setOffline);
		return () => {
			window.removeEventListener("online", setOnline);
			window.removeEventListener("offline", setOffline);
		};
	}, []);
	return { isOffline };
};

//#endregion
export { useOfflineMode };
globalThis.__vuiVersion__ = "4.0.1"
//# sourceMappingURL=useOfflineMode.js.map