{"version":3,"file":"SmoothScroll.uISFZBPR.mjs","names":[],"sources":["https:/framerusercontent.com/modules/tgkaPuX3tEyqxMV2tiWq/SPXHePcHQvTh6SwMlYwI/SmoothScroll.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";export function wrapper(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,className:props.className?`${props.className} scrollWrapper`:\"scrollWrapper\"});}export function snapper(Component){return props=>/*#__PURE__*/_jsx(Component,{...props,className:props.className?`${props.className} scrollSnapper`:\"scrollSnapper\"});}export function scrollToNextSection(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const handleClick=()=>{const sections=Array.from(document.querySelectorAll(\".scrollSnapper\"));if(sections.length===0)return;const currentScroll=window.scrollY;const viewportHeight=window.innerHeight;// Find the next section by comparing scroll position\nconst nextSection=sections.find(section=>{const rect=section.getBoundingClientRect();const sectionTop=rect.top+window.scrollY;return sectionTop>currentScroll+10// adding small offset\n;});if(nextSection){nextSection.scrollIntoView({behavior:\"smooth\"});}else{// Optional: If you reach the end, you could scroll back to top\n// sections[0].scrollIntoView({ behavior: \"smooth\" })\n}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05},onClick:handleClick});});}export function scrollToPreviousSection(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const handleClick=()=>{const sections=Array.from(document.querySelectorAll(\".scrollSnapper\"));if(sections.length===0)return;const currentScroll=window.scrollY;// Find the previous section by comparing scroll position\nconst prevSections=sections.filter(section=>{const rect=section.getBoundingClientRect();const sectionTop=rect.top+window.scrollY;return sectionTop<currentScroll-10// small offset to avoid selecting the current section\n;});const prevSection=prevSections[prevSections.length-1];if(prevSection){prevSection.scrollIntoView({behavior:\"smooth\"});}};return /*#__PURE__*/_jsx(Component,{ref:ref,...props,whileHover:{scale:1.05},onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"wrapper\":{\"type\":\"reactHoc\",\"name\":\"wrapper\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"snapper\":{\"type\":\"reactHoc\",\"name\":\"snapper\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scrollToNextSection\":{\"type\":\"reactHoc\",\"name\":\"scrollToNextSection\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"scrollToPreviousSection\":{\"type\":\"reactHoc\",\"name\":\"scrollToPreviousSection\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SmoothScroll.map"],"mappings":"kMAAyE,SAAgB,EAAQ,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAM,UAAU,GAAG,EAAM,UAAU,gBAAgB,gBAAgB,CAAC,CAAE,SAAgB,EAAQ,EAAU,CAAC,MAAO,IAAoB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,EAAM,UAAU,GAAG,EAAM,UAAU,gBAAgB,gBAAgB,CAAC,CAAE,SAAgB,EAAoB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,MAAgB,CAAC,IAAM,EAAS,MAAM,KAAK,SAAS,iBAAiB,iBAAiB,CAAC,CAAC,GAAG,EAAS,SAAS,EAAE,OAAO,IAAM,EAAc,EAAO,QAA6B,EAAO,YAC9qB,IAAM,EAAY,EAAS,KAAK,GAAqB,EAAQ,uBAAuB,CAAuB,IAAI,EAAO,QAA0B,EAAc,GAC3J,CAAI,GAAa,EAAY,eAAe,CAAC,SAAS,SAAS,CAAC,EAEhE,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,WAAW,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAY,CAAC,EAAG,CAAE,SAAgB,EAAwB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,IAAM,MAAgB,CAAC,IAAM,EAAS,MAAM,KAAK,SAAS,iBAAiB,iBAAiB,CAAC,CAAC,GAAG,EAAS,SAAS,EAA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