{"version":3,"file":"ArrowAnimation.2IPVUESa.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/SQ9EdcmTTuuFII5o4yxe/E6hFGHJAEjGGzKLUrdkD/ArrowAnimation.js"],"sourcesContent":["// Arrow animation component with smooth up and down movement\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{motion,AnimatePresence}from\"framer-motion\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useState,useEffect,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ArrowAnimation(props){const{arrowColor,backgroundColor,animationSpeed,arrowSize,borderRadius,animationDistance}=props;const isStatic=useIsStaticRenderer();const[isVisible,setIsVisible]=useState(true);const[isAtBottom,setIsAtBottom]=useState(false);useEffect(()=>{if(typeof window===\"undefined\"||isStatic)return;const handleScroll=()=>{const scrollTop=window.pageYOffset||document.documentElement.scrollTop;const windowHeight=window.innerHeight;const documentHeight=document.documentElement.scrollHeight;// Check if at the bottom of the page (with small tolerance)\nconst atBottom=scrollTop+windowHeight>=documentHeight-10;if(scrollTop===0){// At the top of the page, show the down arrow\nstartTransition(()=>{setIsVisible(true);setIsAtBottom(false);});}else if(atBottom){// At the bottom of the page, show the up arrow\nstartTransition(()=>{setIsVisible(true);setIsAtBottom(true);});}else{// In the middle, hide the arrow\nstartTransition(()=>setIsVisible(false));}};// Check initial scroll position\nhandleScroll();window.addEventListener(\"scroll\",handleScroll,{passive:true});return()=>{window.removeEventListener(\"scroll\",handleScroll);};},[isStatic]);const handleClick=()=>{if(typeof window===\"undefined\"||isStatic)return;if(isAtBottom){// Scroll to top\nwindow.scrollTo({top:0,behavior:\"smooth\"});}};return /*#__PURE__*/_jsx(AnimatePresence,{children:isVisible&&/*#__PURE__*/_jsxs(motion.div,{style:{width:\"100%\",height:\"100%\",backgroundColor,borderRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",position:\"relative\",overflow:\"hidden\",cursor:isAtBottom?\"pointer\":\"default\"},initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3,ease:\"easeInOut\"},onClick:handleClick,children:[/*#__PURE__*/_jsx(\"link\",{href:\"https://fonts.googleapis.com/icon?family=Material+Icons\",rel:\"stylesheet\"}),isStatic?/*#__PURE__*/_jsx(\"span\",{className:\"material-icons\",style:{fontSize:arrowSize,color:arrowColor,fontFamily:\"Material Icons\",userSelect:\"none\"},children:\"arrow_downward\"}):/*#__PURE__*/_jsx(motion.span,{className:\"material-icons\",style:{fontSize:arrowSize,color:arrowColor,fontFamily:\"Material Icons\",userSelect:\"none\"},animate:{y:isAtBottom?[-animationDistance,0,-animationDistance]:[0,animationDistance,0]},transition:{duration:animationSpeed,repeat:Infinity,ease:\"easeInOut\"},children:isAtBottom?\"arrow_upward\":\"arrow_downward\"})]})});}addPropertyControls(ArrowAnimation,{arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},animationSpeed:{type:ControlType.Number,title:\"Speed\",defaultValue:2,min:.5,max:5,step:.1,unit:\"s\"},arrowSize:{type:ControlType.Number,title:\"Arrow Size\",defaultValue:48,min:16,max:128,step:4,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"},animationDistance:{type:ControlType.Number,title:\"Animation Distance\",defaultValue:20,min:5,max:100,step:5,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArrowAnimation\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArrowAnimation.map"],"mappings":"6QAIG,SAAwB,EAAe,EAAM,CAAC,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