{"version":3,"file":"Examples_2.ix9wlTOq.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/NMAhiuFU8NxS3KF7JTQY/DE4f0N02oLImvUqzC5Ry/Examples_2.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useState}from\"react\";export function withScrollColorChange(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[bg,setBg]=useState(\"transparent\");useEffect(()=>{const handleScroll=()=>{const whiteSection=document.querySelector(\"#whitesection\");const navbar=document.querySelector(\"[data-framer-name='Navigation']\");if(!whiteSection||!navbar)return;const whiteRect=whiteSection.getBoundingClientRect();const navRect=navbar.getBoundingClientRect();const isOverlapping=navRect.bottom>whiteRect.top&&navRect.top<whiteRect.bottom;setBg(isOverlapping?\"black\":\"transparent\");};window.addEventListener(\"scroll\",handleScroll);handleScroll();return()=>window.removeEventListener(\"scroll\",handleScroll);},[]);return /*#__PURE__*/_jsx(Component,{...props,ref:ref,style:{...props.style,backgroundColor:bg,color:\"white\",position:\"fixed\",top:0,left:0,right:0,zIndex:999,transition:\"background-color 0.3s ease\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withScrollColorChange\":{\"type\":\"reactHoc\",\"name\":\"withScrollColorChange\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Examples_2.map"],"mappings":"yIAA4F,SAAgB,EAAsB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAG,GAAOA,EAAS,cAAc,CAAyiB,OAAxiB,MAAc,CAAC,IAAM,MAAiB,CAAC,IAAM,EAAa,SAAS,cAAc,gBAAgB,CAAO,EAAO,SAAS,cAAc,kCAAkC,CAAC,GAAG,CAAC,GAAc,CAAC,EAAO,OAAO,IAAM,EAAU,EAAa,uBAAuB,CAAO,EAAQ,EAAO,uBAAuB,CAAgF,EAA3D,EAAQ,OAAO,EAAU,KAAK,EAAQ,IAAI,EAAU,OAA2B,QAAQ,cAAc,EAAiE,OAA9D,EAAO,iBAAiB,SAAS,EAAa,CAAC,GAAc,KAAW,EAAO,oBAAoB,SAAS,EAAa,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAU,MAAI,MAAM,CAAC,GAAG,EAAM,MAAM,gBAAgB,EAAG,MAAM,QAAQ,SAAS,QAAQ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,WAAW,6BAA6B,CAAC,CAAC,EAAG,sBAAz6B,IAAiD"}