{"version":3,"file":"HideHandClick.C4aMbPjk.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/Ky7qcDsh8WU8m3o39Hql/uVg4fPu6VVQUhzRgicEH/HideHandClick.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";export function withHideHandOnClick(Component){return props=>{const[hidden,setHidden]=useState(false);const ref=useRef(null);useEffect(()=>{const handleClick=event=>{const target=event.target;const waterSection=target.closest('[data-framer-name=\"Water Ripple\"]');if(waterSection){setHidden(true);}};window.addEventListener(\"pointerdown\",handleClick);return()=>{window.removeEventListener(\"pointerdown\",handleClick);};},[]);useEffect(()=>{const element=ref.current;if(!element)return;let wasInView=false;const observer=new IntersectionObserver(([entry])=>{const isInView=entry.isIntersecting;// Re-entered the viewport after leaving\nif(isInView&&!wasInView){setHidden(false);}wasInView=isInView;},{threshold:.5});observer.observe(element);return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,animate:{opacity:hidden?0:1},transition:{duration:.5,ease:\"easeOut\"},style:{...props.style,pointerEvents:\"none\"}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHideHandOnClick\":{\"type\":\"reactHoc\",\"name\":\"withHideHandOnClick\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HideHandClick.map"],"mappings":"8IAAwF,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAO,GAAWA,EAAS,EAAK,EAAQ,EAAIC,EAAO,IAAI,EACnE,OADqE,MAAc,CAAC,IAAM,EAAY,GAAO,CAAc,EAAM,OAAiC,QAAQ,mCAAmD,GAAG,EAAU,EAAI,CAAG,EAAqD,OAAnD,EAAO,iBAAiB,cAAc,CAAW,MAAY,CAAC,EAAO,oBAAoB,cAAc,CAAW,CAAE,CAAE,EAAE,CAAC,CAAC,EAAE,MAAc,CAAC,IAAM,EAAQ,EAAI,QAAQ,GAAG,CAAC,EAAQ,OAAO,IAAI,EAAU,GAAY,EAAS,IAAI,sBAAsB,CAAC,KAAS,CAAC,IAAM,EAAS,EAAM,eACrpB,GAAU,CAAC,GAAW,EAAU,EAAK,EAAG,EAAU,CAAS,EAAE,CAAC,UAAU,EAAE,CAAC,EAA4B,OAA1B,EAAS,QAAQ,CAAO,MAAY,EAAS,WAAW,CAAE,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,QAAQ,CAAC,QAAQ,GAAU,EAAE,WAAW,CAAC,SAAS,GAAG,KAAK,SAAS,EAAE,MAAM,CAAC,GAAG,EAAM,MAAM,cAAc,MAAM,CAAC,CAAC,CAAE,CAAE,qBADhR,IAA6C"}