{"version":3,"file":"ProgressAnimation.D4h_DHOA.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/0ObZxosxMLsJi2dcR8wS/POi37E9A3JqH5JhgUOcO/ProgressAnimation.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,useRef}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ProgressAnimation({progressColor,timeAnimation}){const[width,setWidth]=useState(0);const animationRef=useRef(null);useEffect(()=>{let start=performance.now();const update=now=>{const progress=Math.min((now-start)/timeAnimation*100,100);setWidth(progress);if(progress<100){animationRef.current=requestAnimationFrame(update);}};animationRef.current=requestAnimationFrame(update);return()=>{if(animationRef.current)cancelAnimationFrame(animationRef.current);};},[timeAnimation]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",top:0,left:0,height:\"5px\",width:`${width}%`,backgroundColor:progressColor}})});}addPropertyControls(ProgressAnimation,{progressColor:{title:\"Progress Color\",type:ControlType.Color,defaultValue:\"black\"},timeAnimation:{title:\"Animation Time (ms)\",type:ControlType.Number,defaultValue:2e3,min:100,max:1e4,step:100}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressAnimation.map"],"mappings":"wLAA4I,SAAwB,EAAkB,CAAC,gBAAc,iBAAe,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,EAAE,CAAO,EAAaC,EAAO,KAAK,CAA0W,OAAzW,MAAc,CAAC,IAAI,EAAM,YAAY,KAAK,CAAO,EAAO,GAAK,CAAC,IAAM,EAAS,KAAK,KAAK,EAAI,GAAO,EAAc,IAAI,IAAI,CAAC,EAAS,EAAS,CAAI,EAAS,MAAK,EAAa,QAAQ,sBAAsB,EAAO,GAAuD,MAAnD,GAAa,QAAQ,sBAAsB,EAAO,KAAW,CAAI,EAAa,SAAQ,qBAAqB,EAAa,QAAQ,GAAK,CAAC,EAAc,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,SAAS,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,OAAO,MAAM,MAAM,GAAG,EAAM,GAAG,gBAAgB,EAAc,CAAC,CAAC,CAAC,CAAC,kBAAz0B,IAA6C,IAAoD,CAA0uB,EAAoB,EAAkB,CAAC,cAAc,CAAC,MAAM,iBAAiB,KAAK,EAAY,MAAM,aAAa,QAAQ,CAAC,cAAc,CAAC,MAAM,sBAAsB,KAAK,EAAY,OAAO,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC"}