"use client";
import { useConstant } from "./index88.js";
import { useUnmountEffect } from "./index360.js";
import { useReducedMotionConfig } from "./index362.js";
import { createScopedAnimate } from "./index374.js";
import { useMemo } from "react";
//#region node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs
function useAnimate() {
	const scope = useConstant(() => ({
		current: null,
		animations: []
	}));
	const reduceMotion = useReducedMotionConfig() ?? void 0;
	const animate = useMemo(() => createScopedAnimate({
		scope,
		reduceMotion
	}), [scope, reduceMotion]);
	useUnmountEffect(() => {
		scope.animations.forEach((animation) => animation.stop());
		scope.animations.length = 0;
	});
	return [scope, animate];
}
//#endregion
export { useAnimate };

//# sourceMappingURL=index375.js.map