{"version":3,"file":"ScrollProgress.CS4siDsm.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Aqqfa5JrJoxre5lX64gM/AvE2Lo4XF38hRbtsySJs/ScrollProgress.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,useScroll,useTransform}from\"framer-motion\";export default function ScrollProgress({trackColor=\"rgba(255, 255, 255, 0.2)\",progressColor=\"#FF6B00\",arrowColor=\"#FF6B00\",size=50,strokeWidth=4,url=\"https://www.amadorcampos.com\",fit=true}){const[showArrow,setShowArrow]=useState(false);const{scrollYProgress}=useScroll();// Calcular las dimensiones primero\nconst radius=(size-strokeWidth)/2;const circumference=radius*2*Math.PI;// Ahora usamos circumference después de su declaración\nconst dashOffset=useTransform(scrollYProgress,[0,1],[circumference,0]);useEffect(()=>{return scrollYProgress.onChange(v=>{setShowArrow(v>=.98);});},[]);return /*#__PURE__*/_jsxs(motion.div,{style:{width:size,height:size,objectFit:fit?\"contain\":\"none\"},children:[/*#__PURE__*/_jsxs(\"svg\",{width:size,height:size,style:{transform:\"rotate(-90deg)\"},children:[/*#__PURE__*/_jsx(\"circle\",{cx:size/2,cy:size/2,r:radius,stroke:trackColor,strokeWidth:strokeWidth,fill:\"none\"}),/*#__PURE__*/_jsx(motion.circle,{cx:size/2,cy:size/2,r:radius,stroke:progressColor,strokeWidth:strokeWidth,fill:\"none\",strokeDasharray:circumference,style:{strokeDashoffset:dashOffset}})]}),showArrow&&/*#__PURE__*/_jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},style:{position:\"absolute\",top:\"50%\",left:\"50%\",transform:\"translate(-50%, -50%)\",width:size*.4,height:size*.4,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",fill:arrowColor,width:\"100%\",height:\"100%\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z\"})})})]});}addPropertyControls(ScrollProgress,{trackColor:{type:ControlType.Color,title:\"Track Color\"},progressColor:{type:ControlType.Color,title:\"Progress Color\"},arrowColor:{type:ControlType.Color,title:\"Arrow Color\"},size:{type:ControlType.Number,title:\"Size\",min:20,max:200,step:1,defaultValue:50},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",min:1,max:20,step:1,defaultValue:4},url:{type:ControlType.Link,title:\"URL\"},fit:{type:ControlType.Boolean,title:\"Fit Content\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScrollProgress\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScrollProgress.map"],"mappings":"wPAA4M,SAAwB,EAAe,CAAC,aAAW,2BAA2B,gBAAc,UAAU,aAAW,UAAU,OAAK,GAAG,cAAY,EAAE,MAAI,+BAA+B,MAAI,IAAM,CAAC,GAAK,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,mBAAiB,GAAW,CACrd,GAAQ,EAAK,GAAa,EAAQ,EAAc,EAAO,EAAE,KAAK,GAC9D,EAAW,EAAa,EAAgB,CAAC,EAAE,EAAE,CAAC,CAAC,EAAc,EAAE,CAAC,CAAkF,OAAjF,MAAsB,EAAgB,SAAS,GAAG,CAAC,EAAa,GAAG,IAAI,EAAG,CAAG,EAAE,CAAC,CAAqB,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,UAAU,EAAI,UAAU,OAAO,CAAC,SAAS,CAAc,EAAM,MAAM,CAAC,MAAM,EAAK,OAAO,EAAK,MAAM,CAAC,UAAU,iBAAiB,CAAC,SAAS,CAAc,EAAK,SAAS,CAAC,GAAG,EAAK,EAAE,GAAG,EAAK,EAAE,EAAE,EAAO,OAAO,EAA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