{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/FMqsD7vurJ4RwaAOdZDi/rG23INWAWx2QNoR7DYJe/Scrollbar.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion,useAnimation}from\"framer-motion\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n * @framerIntrinsicWidth 20\n * @framerIntrinsicHeight 300\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export function WaterScrollbar(props){const{scrollColor,backgroundColor,style}=props;const[scrollY,setScrollY]=useState(0);const[scrollHeight,setScrollHeight]=useState(0);const[isCelebrating,setIsCelebrating]=useState(false);const controls=useAnimation();useEffect(()=>{const updateScroll=()=>{const currentScrollY=window.scrollY;const totalScrollHeight=document.documentElement.scrollHeight-window.innerHeight;setScrollY(currentScrollY);setScrollHeight(totalScrollHeight);if(currentScrollY>=totalScrollHeight){setIsCelebrating(true)// Trigger celebration when scrolled to the bottom\n;controls.start({opacity:[1,0],transition:{duration:2,ease:\"easeOut\"}});}else{setIsCelebrating(false)// Reset celebration when not at the bottom\n;}};window.addEventListener(\"scroll\",updateScroll);updateScroll()// Initial call\n;return()=>window.removeEventListener(\"scroll\",updateScroll);},[controls]);const fillHeight=scrollY/scrollHeight*100;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"fixed\",top:120,height:\"70vh\",width:2},children:[isCelebrating&&/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:-20,left:\"50%\",transform:\"translateX(-50%)\",width:2,height:2,zIndex:1},children:[...Array(12)].map((_,i)=>/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",width:5,height:5,backgroundColor:scrollColor,borderRadius:\"50%\",top:\"50%\",left:\"50%\",transformOrigin:\"center\"},initial:{x:0,y:0,opacity:1},animate:{x:[0,Math.cos(i/12*2*Math.PI)*50],y:[0,Math.sin(i/12*2*Math.PI)*50],opacity:[1,0],transition:{repeat:1,repeatType:\"loop\",duration:2,ease:\"easeOut\"}}},i))}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor:backgroundColor,borderRadius:\"10px\",opacity:.02,...style}}),/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",width:\"100%\",height:`${fillHeight}%`,backgroundColor:scrollColor,borderRadius:\"10px\",bottom:0,overflow:\"hidden\"},animate:{// Adding a wave effect\ny:[0,-5,0],transition:{repeat:Infinity,repeatType:\"loop\",duration:1.5,ease:\"easeInOut\"}},children:/*#__PURE__*/_jsx(motion.div,{style:{position:\"absolute\",top:\"90%\",left:0,width:\"100%\",height:\"15%\",backgroundColor:scrollColor,borderRadius:\"50% 50% 0 0\"},animate:{x:[-10,10,-10],transition:{repeat:Infinity,repeatType:\"loop\",duration:2,ease:\"easeInOut\"}}})})]});}WaterScrollbar.defaultProps={scrollColor:\"#ba9043\",backgroundColor:\"#ffffff\"};addPropertyControls(WaterScrollbar,{scrollColor:{type:ControlType.Color,title:\"Scroll Color\",defaultValue:\"#ba9043\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"WaterScrollbar\":{\"type\":\"reactComponent\",\"name\":\"WaterScrollbar\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"* @framerIntrinsicWidth 20\",\"framerIntrinsicHeight\":\"300\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Scrollbar.map"],
  "mappings": "qKAMU,SAASA,EAAeC,EAAM,CAAC,GAAK,CAAC,YAAAC,EAAY,gBAAAC,EAAgB,MAAAC,CAAK,EAAEH,EAAW,CAACI,EAAQC,CAAU,EAAEC,EAAS,CAAC,EAAO,CAACC,EAAaC,CAAe,EAAEF,EAAS,CAA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AE,EAAE,EAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,OAAO,SAAS,EAAE,KAAK,SAAS,CAAC,CAAC,EAAEA,CAAC,CAAC,CAAC,CAAC,EAAeH,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,gBAAgBjB,EAAgB,aAAa,OAAO,QAAQ,IAAI,GAAGC,CAAK,CAAC,CAAC,EAAegB,EAAKC,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,GAAGF,KAAc,gBAAgBjB,EAAY,aAAa,OAAO,OAAO,EAAE,SAAS,QAAQ,EAAE,QAAQ,CAC/iC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,WAAW,CAAC,OAAO,IAAS,WAAW,OAAO,SAAS,IAAI,KAAK,WAAW,CAAC,EAAE,SAAsBkB,EAAKC,EAAO,IAAI,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,MAAM,KAAK,EAAE,MAAM,OAAO,OAAO,MAAM,gBAAgBnB,EAAY,aAAa,aAAa,EAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,GAAG,GAAG,EAAE,WAAW,CAAC,OAAO,IAAS,WAAW,OAAO,SAAS,EAAE,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAACF,EAAe,aAAa,CAAC,YAAY,UAAU,gBAAgB,SAAS,EAAEwB,EAAoBxB,EAAe,CAAC,YAAY,CAAC,KAAKyB,EAAY,MAAM,MAAM,eAAe,aAAa,SAAS,EAAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,mBAAmB,aAAa,SAAS,CAAC,CAAC",
  "names": ["WaterScrollbar", "props", "scrollColor", "backgroundColor", "style", "scrollY", "setScrollY", "ye", "scrollHeight", "setScrollHeight", "isCelebrating", "setIsCelebrating", "controls", "useAnimation", "ue", "updateScroll", "currentScrollY", "window", "totalScrollHeight", "fillHeight", "p", "motion", "_", "i", "addPropertyControls", "ControlType"]
}
