"use client";
import { useEffect, useState } from "react";
//#region packages/@mantine/hooks/src/use-document-visibility/use-document-visibility.ts
function useDocumentVisibility() {
	const [documentVisibility, setDocumentVisibility] = useState("visible");
	useEffect(() => {
		setDocumentVisibility(document.visibilityState);
		const listener = () => setDocumentVisibility(document.visibilityState);
		document.addEventListener("visibilitychange", listener);
		return () => document.removeEventListener("visibilitychange", listener);
	}, []);
	return documentVisibility;
}
//#endregion
export { useDocumentVisibility };

//# sourceMappingURL=use-document-visibility.mjs.map