"use client";
let react = require("react");
let _mantine_hooks = require("@mantine/hooks");
//#region packages/@mantine/core/src/components/AppShell/use-resizing/use-resizing.tsx
function useResizing({ transitionDuration, disabled }) {
	const [resizing, setResizing] = (0, react.useState)(true);
	const resizingTimeout = (0, react.useRef)(-1);
	const disabledTimeout = (0, react.useRef)(-1);
	(0, _mantine_hooks.useWindowEvent)("resize", () => {
		setResizing(true);
		clearTimeout(resizingTimeout.current);
		resizingTimeout.current = window.setTimeout(() => (0, react.startTransition)(() => {
			setResizing(false);
		}), 200);
	});
	(0, _mantine_hooks.useIsomorphicEffect)(() => {
		setResizing(true);
		clearTimeout(disabledTimeout.current);
		disabledTimeout.current = window.setTimeout(() => (0, react.startTransition)(() => {
			setResizing(false);
		}), transitionDuration || 0);
	}, [disabled, transitionDuration]);
	return resizing;
}
//#endregion
exports.useResizing = useResizing;

//# sourceMappingURL=use-resizing.cjs.map