import { useEffect } from "react";
const useStopPropagation = (ref, events) => {
	const handleEvent = (e) => e.stopPropagation();
	useEffect(() => {
		events.forEach((name) => ref?.current?.addEventListener(name, handleEvent));
		return () => events.forEach((name) => ref.current?.removeEventListener(name, handleEvent));
	}, [ref]);
};
export { useStopPropagation as t };

//# sourceMappingURL=usestopPropagation.js.map