{"version":3,"file":"ProgressAnimation.C8NNKiZM.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/VBrwIobN3zuifhMU26pd/dmArTmdVpqmxqRfiqYl9/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,delay}=props;const[width,setWidth]=useState(0);// Startet die Animation einmal nach einer Wartezeit\nuseEffect(()=>{const delayTimer=setTimeout(()=>{requestAnimationFrame(()=>setWidth(100));},delay);return()=>clearTimeout(delayTimer);},[timeAnimation,delay]);const styles={container:{width:\"100%\",height:\"100%\",position:\"relative\",overflow:\"hidden\"},background:{position:\"absolute\",inset:0,background:backgroundColor},progress:{position:\"absolute\",top:0,left:0,height:\"100%\",width:`${width}%`,background:progressColor,transition:`width ${timeAnimation}ms linear`,willChange:\"width\"}};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:\"Duration (ms)\",type:ControlType.Number,defaultValue:3e3,min:100,max:2e4,step:100},delay:{title:\"Delay before start (ms)\",type:ControlType.Number,defaultValue:0,min:0,max:2e4,step:100}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProgressAnimation.map"],"mappings":"mLAAmJ,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,kBAAgB,gBAAc,gBAAc,SAAO,EAAW,CAAC,EAAM,GAAUA,EAAS,EAAE,CACpS,MAAc,CAAC,IAAM,EAAW,eAAe,CAAC,0BAA0B,EAAS,IAAI,CAAC,EAAG,EAAM,CAAC,UAAU,aAAa,EAAW,EAAG,CAAC,EAAc,EAAM,CAAC,CAAC,IAAM,EAAO,CAAC,UAAU,CAAC,MAAM,OAAO,OAAO,OAAO,SAAS,WAAW,SAAS,SAAS,CAAC,WAAW,CAAC,SAAS,WAAW,MAAM,EAAE,WAAW,EAAgB,CAAC,SAAS,CAAC,SAAS,WAAW,IAAI,EAAE,KAAK,EAAE,OAAO,OAAO,MAAM,GAAG,EAAM,GAAG,WAAW,EAAc,WAAW,SAAS,EAAc,WAAW,WAAW,QAAQ,CAAC,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,EAAO,UAAU,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,EAAO,WAAW,CAAC,CAAc,EAAK,MAAM,CAAC,MAAM,EAAO,SAAS,CAAC,CAAC,CAAC,CAAC,kBADllB,IAAsC,IAAoD,CAC0f,EAAoB,EAAkB,CAAC,gBAAgB,CAAC,MAAM,mBAAmB,KAAK,EAAY,MAAM,aAAa,sBAAsB,CAAC,cAAc,CAAC,MAAM,iBAAiB,KAAK,EAAY,MAAM,aAAa,QAAQ,CAAC,cAAc,CAAC,MAAM,gBAAgB,KAAK,EAAY,OAAO,aAAa,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,CAAC,MAAM,CAAC,MAAM,0BAA0B,KAAK,EAAY,OAAO,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,IAAI,CAAC,CAAC"}