{"version":3,"file":"ProgressAnimation_3.0tkWmsFX.mjs","names":["useState","useEffect","_jsxs","_jsx","__esmMin","init_npm_react_18_3_1","ce","_e","c","p","init_jsx_runtime","addPropertyControls","init_framer_B3LLf74D","ControlType","ProgressAnimation","props","backgroundColor","progressColor","timeAnimation","width","setWidth","interval","prevWidth","styles","init_ProgressAnimation_3"],"sources":["https:/framerusercontent.com/modules/35JdBu5JinB4MgHQ3JIX/6qMxHfxZNGjlUqM6vUTK/ProgressAnimation_3.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(function(){const interval=setInterval(function(){setWidth(prevWidth=>prevWidth>=100?0:prevWidth+1);},timeAnimation);return function cleanup(){clearInterval(interval);};},[timeAnimation]);const styles={container:{width:\"100%\",height:\"100%\",position:\"relative\",radius:\"100px\",overflow:\"hidden\"},background:{position:\"absolute\",top:0,left:0,width:\"100%\",radius:\"100px\",height:\"100%\",background:backgroundColor},progress:{position:\"absolute\",top:0,left:0,height:\"100%\",radius:\"100px\",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\"}},\"__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