{"version":3,"file":"FloatingButtons.CJc19o0q.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/HYha249SifhJdzkksg9S/LQRMDhYABqeKyT6VCjsM/FloatingButtons.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect}from\"react\";export default function FloatingButtons({offsetBottom,offsetRight,showAfterPx,accentColor,accentText}){const[scrolled,setScrolled]=useState(false);const[hoveredTop,setHoveredTop]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const onScroll=()=>setScrolled(window.scrollY>showAfterPx);onScroll();window.addEventListener(\"scroll\",onScroll,{passive:true});return()=>window.removeEventListener(\"scroll\",onScroll);},[showAfterPx]);const scrollToTop=()=>window.scrollTo({top:0,behavior:\"smooth\"});return /*#__PURE__*/_jsx(\"button\",{onClick:scrollToTop,style:{position:\"fixed\",zIndex:9999,bottom:offsetBottom,right:offsetRight,width:48,height:48,borderRadius:\"50%\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",cursor:\"pointer\",border:\"none\",outline:\"none\",padding:0,background:hoveredTop?accentColor:\"rgba(255,255,255,0.92)\",color:hoveredTop?accentText:\"#000\",backdropFilter:\"blur(12px)\",WebkitBackdropFilter:\"blur(12px)\",boxShadow:\"0 2px 12px rgba(0,0,0,0.12)\",opacity:scrolled?1:0,pointerEvents:scrolled?\"auto\":\"none\",transform:scrolled?\"translateY(0)\":\"translateY(10px)\",transition:\"opacity 0.2s ease, transform 0.2s ease, background 0.15s ease\",fontFamily:\"Geist, ui-sans-serif, system-ui, sans-serif\",userSelect:\"none\",WebkitUserSelect:\"none\"},onMouseEnter:()=>setHoveredTop(true),onMouseLeave:()=>setHoveredTop(false),children:/*#__PURE__*/_jsxs(\"svg\",{width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2.2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"line\",{x1:\"12\",y1:\"19\",x2:\"12\",y2:\"5\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"5 12 12 5 19 12\"})]})});}addPropertyControls(FloatingButtons,{offsetBottom:{type:ControlType.Number,title:\"Bottom Offset\",defaultValue:32,min:0,max:200,step:1},offsetRight:{type:ControlType.Number,title:\"Right Offset\",defaultValue:32,min:0,max:200,step:1},showAfterPx:{type:ControlType.Number,title:\"Show After\",defaultValue:300,min:0,max:2e3,step:50,description:\"Scroll depth (px) before button appears\"},accentColor:{type:ControlType.Color,title:\"Hover BG\",defaultValue:\"#4F29CE\"},accentText:{type:ControlType.Color,title:\"Hover Icon\",defaultValue:\"#ffffff\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FloatingButtons\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FloatingButtons.map"],"mappings":"sMAAmJ,SAAwB,EAAgB,CAAC,eAAa,cAAY,cAAY,cAAY,cAAY,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAW,GAAeA,EAAS,GAAM,CAAgU,OAA/T,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAa,EAAY,EAAO,QAAQ,EAAY,CAAsE,OAArE,GAAU,CAAC,EAAO,iBAAiB,SAAS,EAAS,CAAC,QAAQ,GAAK,CAAC,KAAW,EAAO,oBAAoB,SAAS,EAAS,EAAG,CAAC,EAAY,CAAC,CAAsF,EAAK,SAAS,CAAC,YAA9E,EAAO,SAAS,CAAC,IAAI,EAAE,SAAS,SAAS,CAAC,CAAwD,MAAM,CAAC,SAAS,QAAQ,OAAO,KAAK,OAAO,EAAa,MAAM,EAAY,MAAM,GAAG,OAAO,GAAG,aAAa,MAAM,QAAQ,cAAc,WAAW,SAAS,eAAe,SAAS,OAAO,UAAU,OAAO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