import*as React from"react";const useEnhancedEffect="undefined"!=typeof window?React.useLayoutEffect:React.useEffect;export default function useEventCallback(e){const t=React.useRef(e);return useEnhancedEffect(()=>{t.current=e}),React.useCallback((...e)=>(0,t.current)(...e),[])};