{"version":3,"file":"ScrollToTopArrow.WIStMrLS.mjs","names":["useState","__esmMin","init_ssg_sandbox_shims","te","window","_e","init_jsx_runtime","c","init_npm_react_18_3_1","ce","motion","AnimatePresence","init_framer_motion_DhsWWWsN","init_framer_CaDWdxiz","addPropertyControls","ControlType","useIsStaticRenderer","ScrollToTopArrow","props","isVisible","setIsVisible","isStatic","toggleVisibility","showThreshold","size","shadow","arrowColor","baseStyles","position","offset","init_ScrollToTopArrow"],"sources":["https:/framerusercontent.com/modules/VEulszIQBNxQjmaCBp29/M4Z8UxKqcw2WXIMyuKjP/ScrollToTopArrow.js"],"sourcesContent":["// Arrow scroll to top component with smooth scrolling animation\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ScrollToTopArrow(props){const{showThreshold=300,backgroundColor=\"#000000\",arrowColor=\"#FFFFFF\",size=50,borderRadius=25,shadow=true,position=\"bottom-right\",offset=20}=props;const[isVisible,setIsVisible]=useState(false);const isStatic=useIsStaticRenderer();useEffect(()=>{if(isStatic||typeof window===\"undefined\")return;const toggleVisibility=()=>{if(window.pageYOffset>showThreshold){startTransition(()=>setIsVisible(true));}else{startTransition(()=>setIsVisible(false));}};window.addEventListener(\"scroll\",toggleVisibility);return()=>window.removeEventListener(\"scroll\",toggleVisibility);},[showThreshold,isStatic]);const scrollToTop=()=>{if(typeof window!==\"undefined\"){window.scrollTo({top:0,behavior:\"smooth\"});}};const getPositionStyles=()=>{const baseStyles={position:\"fixed\",zIndex:1e3};switch(position){case\"bottom-right\":return{...baseStyles,bottom:offset,right:offset};case\"bottom-left\":return{...baseStyles,bottom:offset,left:offset};case\"bottom-center\":return{...baseStyles,bottom:offset,left:\"50%\",transform:\"translateX(-50%)\"};default:return baseStyles;}};// Show static preview in Canvas\nif(isStatic){return /*#__PURE__*/_jsx(\"div\",{style:{width:size,height:size,backgroundColor,borderRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",boxShadow:shadow?\"0 4px 12px rgba(0, 0, 0, 0.15)\":\"none\",position:\"relative\"},children:/*#__PURE__*/_jsx(\"svg\",{width:size*.4,height:size*.4,viewBox:\"0 0 24 24\",fill:\"none\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M18 15l-6-6-6 6\"})})});}return /*#__PURE__*/_jsx(AnimatePresence,{children:isVisible&&/*#__PURE__*/_jsx(motion.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.95},transition:{type:\"spring\",stiffness:400,damping:25},onClick:scrollToTop,style:{...getPositionStyles(),width:size,height:size,backgroundColor,border:\"none\",borderRadius,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",boxShadow:shadow?\"0 4px 12px rgba(0, 0, 0, 0.15)\":\"none\",outline:\"none\"},\"aria-label\":\"Scroll to top\",role:\"button\",children:/*#__PURE__*/_jsx(\"svg\",{width:size*.4,height:size*.4,viewBox:\"0 0 24 24\",fill:\"none\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M18 15l-6-6-6 6\"})})})});}addPropertyControls(ScrollToTopArrow,{showThreshold:{type:ControlType.Number,title:\"Show Threshold\",defaultValue:300,min:0,max:1e3,step:50,unit:\"px\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#000000\"},arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"#FFFFFF\"},size:{type:ControlType.Number,title:\"Size\",defaultValue:50,min:30,max:80,step:5,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:25,min:0,max:40,step:1,unit:\"px\"},shadow:{type:ControlType.Boolean,title:\"Shadow\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},position:{type:ControlType.Enum,title:\"Position\",options:[\"bottom-right\",\"bottom-left\",\"bottom-center\"],optionTitles:[\"Bottom Right\",\"Bottom Left\",\"Bottom Center\"],defaultValue:\"bottom-right\",displaySegmentedControl:true},offset:{type:ControlType.Number,title:\"Offset\",defaultValue:20,min:10,max:50,step:5,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollToTopArrow\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollToTopArrow.map"],"mappings":"A,sQAIG,SAAwBiB,EAAiB,EAAM,CAAC,GAAK,CAAC,gBAAc,IAAI,kBAAgB,UAAU,aAAW,UAAU,OAAK,GAAG,eAAa,GAAG,SAAO,GAAK,WAAS,eAAe,SAAO,IAAIC,EAAW,CAACC,EAAUC,GAAcpB,EAAS,EAAK,EAAQqB,EAASL,EAAoB,EACsN,OADpNP,MAAc,CAAC,GAAGY,GAAiBjB,IAAS,OAAY,OAAO,IAAMkB,MAAqB,CAAIlB,EAAO,YAAYmB,EAAepB,MAAoBiB,EAAa,EAAI,CAAC,EAAQjB,MAAoBiB,EAAa,EAAK,CAAC,CAAG,EAAqD,OAAnDhB,EAAO,iBAAiB,SAASkB,CAAgB,MAAYlB,EAAO,oBAAoB,SAASkB,CAAgB,CAAE,EAAE,CAACC,EAAcF,CAAQ,CAAC,EAC9nBA,EAA8B,gBAAK,MAAM,CAAC,MAAM,CAAC,MAAMG,EAAK,OAAOA,EAAK,kBAAgB,eAAa,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,OAAO,UAAU,UAAUC,EAAO,iCAAiC,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