{"version":3,"file":"ProgressAnimation.lx6GMBFm.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/7feQ0F6oDNr7HAuc8D16/w612tqt0Z2cHchePMZJY/ProgressAnimation.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ProgressAnimation(props){const{backgroundColor,progressColor,timeAnimation}=props;const[width,setWidth]=useState(0);useEffect(()=>{const interval=setInterval(()=>{setWidth(prevWidth=>{if(prevWidth>=100){clearInterval(interval)// Stop the loop at 100%\n;return 100// Keep width at 100%\n;}return prevWidth+1;});},timeAnimation);return()=>clearInterval(interval);},[timeAnimation]);const styles={container:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\"},background:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",background:backgroundColor},progress:{position:\"absolute\",top:0,left:0,height:\"100%\",width:`${width}%`,background:progressColor,transition:`width ${timeAnimation}ms linear`}};return /*#__PURE__*/_jsxs(\"div\",{style:styles.container,children:[/*#__PURE__*/_jsx(\"div\",{style:styles.background}),/*#__PURE__*/_jsx(\"div\",{style:styles.progress})]});}addPropertyControls(ProgressAnimation,{backgroundColor:{title:\"Background Color\",type:ControlType.Color,defaultValue:\"rgba(0, 0, 0, 0.12)\"},progressColor:{title:\"Progress Color\",type:ControlType.Color,defaultValue:\"black\"},timeAnimation:{title:\"Animation Time (ms)\",type:ControlType.Number,defaultValue:90,min:10,max:1e3,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressAnimation.map"],"mappings":"wLAAmJ,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,kBAAgB,gBAAc,iBAAe,EAAW,CAAC,EAAM,GAAUA,EAAS,CAAC,EAAE,MAAc,CAAC,IAAM,EAAS,gBAAgB,CAAC,EAAS,GAAe,GAAW,KAAK,cAAc,CAAQ,EACpY,KACC,EAAU,CAAG,CAAE,EAAE,CAAa,EAAE,UAAU,cAAc,CAAQ,CAAE,EAAE,CAAC,CAAa,CAAC,EAAE,IAAM,EAAO,CAAC,UAAU,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,QAAQ,EAAE,WAAW,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,MAAM,OAAO,OAAO,OAAO,WAAW,CAAe,EAAE,SAAS,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,OAAO,OAAO,MAAM,GAAG,EAAM,GAAG,WAAW,EAAc,WAAW,SAAS,EAAc,UAAU,CAAC,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,EAAO,UAAU,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,EAAO,UAAU,CAAC,EAAe,EAAK,MAAM,CAAC,MAAM,EAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAE,iBAFjiB,IAAsC,IAAoD,EAEwc,EAAoB,EAAkB,CAAC,gBAAgB,CAAC,MAAM,mBAAmB,KAAK,EAAY,MAAM,aAAa,qBAAqB,EAAE,cAAc,CAAC,MAAM,iBAAiB,KAAK,EAAY,MAAM,aAAa,OAAO,EAAE,cAAc,CAAC,MAAM,sBAAsB,KAAK,EAAY,OAAO,aAAa,GAAG,IAAI,GAAG,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC"}