"use client";
import { useWindowEvent } from "../use-window-event/use-window-event.mjs";
import { useCallback, useEffect, useState } from "react";
//#region packages/@mantine/hooks/src/use-viewport-size/use-viewport-size.ts
const eventListenerOptions = { passive: true };
function useViewportSize() {
	const [windowSize, setWindowSize] = useState({
		width: 0,
		height: 0
	});
	const setSize = useCallback(() => {
		setWindowSize({
			width: window.innerWidth || 0,
			height: window.innerHeight || 0
		});
	}, []);
	useWindowEvent("resize", setSize, eventListenerOptions);
	useWindowEvent("orientationchange", setSize, eventListenerOptions);
	useEffect(setSize, []);
	return windowSize;
}
//#endregion
export { useViewportSize };

//# sourceMappingURL=use-viewport-size.mjs.map