{"version":3,"file":"ReturnButton.BuoS7tkZ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/MRzrd9DhiwKOoh5GKUPU/ag9zrPqwvbrGBwEgMPPV/ReturnButton.js"],"sourcesContent":["// Return to top button that appears when user scrolls to second section\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ReturnButton(props){const{buttonColor,arrowColor,buttonSize,borderRadius,showShadow,scrollThreshold}=props;const[isVisible,setIsVisible]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const handleScroll=()=>{const scrollPosition=window.scrollY;const shouldShow=scrollPosition>=scrollThreshold;startTransition(()=>{setIsVisible(shouldShow);});};window.addEventListener(\"scroll\",handleScroll);handleScroll();return()=>window.removeEventListener(\"scroll\",handleScroll);},[scrollThreshold]);const scrollToTop=()=>{if(typeof window===\"undefined\")return;window.scrollTo({top:0,behavior:\"smooth\"});};if(!isVisible)return null;return /*#__PURE__*/_jsx(\"button\",{onClick:scrollToTop,style:{position:\"fixed\",right:20,bottom:20,width:buttonSize,height:buttonSize,backgroundColor:buttonColor,border:\"none\",borderRadius,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"opacity 0.3s ease\",boxShadow:showShadow?\"0 2px 8px rgba(0,0,0,0.15)\":\"none\",zIndex:1e3},\"aria-label\":\"Return to top\",children:/*#__PURE__*/_jsxs(\"svg\",{width:buttonSize*.5,height:buttonSize*.5,viewBox:\"0 0 24 24\",fill:\"none\",stroke:arrowColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"title\",{children:\"Up arrow\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"18 15 12 9 6 15\"})]})});}addPropertyControls(ReturnButton,{buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"rgba(0, 0, 0, 0)\"},arrowColor:{type:ControlType.Color,title:\"Arrow Color\",defaultValue:\"#999999\"},buttonSize:{type:ControlType.Number,title:\"Button Size\",defaultValue:50,min:30,max:100,step:5,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:25,min:0,max:50,step:1,unit:\"px\"},showShadow:{type:ControlType.Boolean,title:\"Shadow\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},scrollThreshold:{type:ControlType.Number,title:\"Scroll Threshold\",defaultValue:800,min:0,max:3e3,step:100,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReturnButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReturnButton.map"],"mappings":"6MAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,cAAY,aAAW,aAAW,eAAa,aAAW,mBAAiB,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAye,OAAxe,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAiB,CAAqC,IAAM,EAArB,EAAO,SAAyC,EAAgB,MAAoB,CAAC,EAAa,EAAW,EAAG,EAAiE,OAA9D,EAAO,iBAAiB,SAAS,EAAa,CAAC,GAAc,KAAW,EAAO,oBAAoB,SAAS,EAAa,EAAG,CAAC,EAAgB,CAAC,CAA+G,EAA0C,EAAK,SAAS,CAAC,YAAjJ,CAAW,IAAS,QAAmB,EAAO,SAAS,CAAC,IAAI,EAAE,SAAS,SAAS,CAAC,EAAoF,MAAM,CAAC,SAAS,QAAQ,MAAM,GAAG,OAAO,GAAG,MAAM,EAAW,OAAO,EAAW,gBAAgB,EAAY,OAAO,OAAO,eAAa,OAAO,UAAU,QAAQ,OAAO,W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