{"version":3,"file":"BackToTopButton.CjNDH2dW.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/PMi7zHdQ2j6wCuuRmtuI/xBnmpbY1MwcIirbhzGtj/BackToTopButton.js"],"sourcesContent":["// Back to top button that scrolls to page top with customizable styling\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,startTransition}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function BackToTopButton(props){const{backgroundColor,iconColor,padding,borderRadius}=props;const[isVisible,setIsVisible]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const handleScroll=()=>{const scrollTop=window.pageYOffset||document.documentElement.scrollTop;startTransition(()=>{setIsVisible(scrollTop>200);});};window.addEventListener(\"scroll\",handleScroll);// Check initial scroll position\nhandleScroll();return()=>{window.removeEventListener(\"scroll\",handleScroll);};},[]);const handleClick=()=>{if(typeof window!==\"undefined\"){window.scrollTo({top:0,behavior:\"smooth\"});}};return /*#__PURE__*/_jsx(\"button\",{onClick:handleClick,style:{...props.style,backgroundColor,border:\"none\",borderRadius,padding,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",transition:\"all 0.3s ease\",boxShadow:\"0 2px 8px rgba(0, 0, 0, 0.1)\",opacity:isVisible?1:0,visibility:isVisible?\"visible\":\"hidden\",transform:isVisible?\"translateY(0)\":\"translateY(20px)\"},onMouseEnter:e=>{if(isVisible){e.currentTarget.style.transform=\"translateY(-2px)\";e.currentTarget.style.boxShadow=\"0 4px 12px rgba(0, 0, 0, 0.15)\";}},onMouseLeave:e=>{if(isVisible){e.currentTarget.style.transform=\"translateY(0)\";e.currentTarget.style.boxShadow=\"0 2px 8px rgba(0, 0, 0, 0.1)\";}},\"aria-label\":\"Back to top\",children:/*#__PURE__*/_jsx(\"svg\",{width:\"24\",height:\"24\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:iconColor,strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M12 19V5m-7 7l7-7 7 7\"})})});}addPropertyControls(BackToTopButton,{backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#000000\"},iconColor:{type:ControlType.Color,title:\"Icon Color\",defaultValue:\"#FFFFFF\"},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:12,min:4,max:32,step:2,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:50,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BackToTopButton\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BackToTopButton.map"],"mappings":"yTAIG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,kBAAgB,YAAU,UAAQ,gBAAc,EAAW,CAAC,EAAU,GAAcA,EAAS,GAAM,CAC8B,OAD7B,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAiB,CAAC,IAAM,EAAU,EAAO,aAAa,SAAS,gBAAgB,UAAU,MAAoB,CAAC,EAAa,EAAU,IAAI,EAAG,EACpV,OADuV,EAAO,iBAAiB,SAAS,EAAa,CACpZ,GAAc,KAAW,CAAC,EAAO,oBAAoB,SAAS,EAAa,GAAK,EAAE,CAAC,CAA0H,EAAK,SAAS,CAAC,YAAlH,CAAW,IAAS,QAAa,EAAO,SAAS,CAAC,IAAI,EAAE,SAAS,SAAS,CAAC,EAA2D,MAAM,CAAC,GAAG,EAAM,MAAM,kBAAgB,OAAO,OAAO,eAAa,UAAQ,OAAO,UAAU,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,WAAW,gBAAgB,UAAU,+BAA+B,QAAQ,EAAU,EAAE,E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