{"version":3,"file":"Bar_Animation.CeZGrZuo.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/ENgwEKbMdyfL9EkX2keS/bAxa2TtdteCiMT2qseDM/Bar_Animation.js"],"sourcesContent":["// AudioWaveAnimation.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Framer Code Component for Audio Wave Animation\nexport default function AudioWaveAnimation(props){const{barCount=20,minHeight=10,maxHeight=30,barWidth=3,barGap=4,barColor=\"#C2DAFF\",animationSpeed=150}=props;// Generate bars with random heights\nconst generateBars=()=>{return Array.from({length:barCount},()=>Math.floor(Math.random()*(maxHeight-minHeight+1))+minHeight);};// State hook for bar heights\nconst[bars,setBars]=React.useState(generateBars());// Effect hook for animation\nReact.useEffect(()=>{const interval=setInterval(()=>{setBars(generateBars());},animationSpeed);return()=>clearInterval(interval);},[barCount,minHeight,maxHeight,animationSpeed]);return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",height:\"100%\"},children:bars.map((barHeight,index)=>/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:`${barWidth}px`,height:`${barHeight}px`,backgroundColor:barColor,marginLeft:`${barGap}px`,borderRadius:\"2px\",transition:\"height 150ms ease-in-out\"}})},index))})});}// Property Controls for Framer\naddPropertyControls(AudioWaveAnimation,{barCount:{type:ControlType.Number,title:\"Bar Count\",defaultValue:20,min:5,max:50,step:1},minHeight:{type:ControlType.Number,title:\"Min Height\",defaultValue:10,min:1,max:100,step:1},maxHeight:{type:ControlType.Number,title:\"Max Height\",defaultValue:30,min:10,max:200,step:1},barWidth:{type:ControlType.Number,title:\"Bar Width\",defaultValue:3,min:1,max:20,step:1},barGap:{type:ControlType.Number,title:\"Bar Gap\",defaultValue:4,min:0,max:20,step:1},barColor:{type:ControlType.Color,title:\"Bar Color\",defaultValue:\"#C2DAFF\"},animationSpeed:{type:ControlType.Number,title:\"Animation Speed\",defaultValue:150,min:50,max:500,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AudioWaveAnimation\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Bar_Animation.map"],"mappings":"kLAEA,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,WAAS,GAAG,YAAU,GAAG,YAAU,GAAG,WAAS,EAAE,SAAO,EAAE,WAAS,UAAU,iBAAe,KAAK,EACnJ,MAAyB,MAAM,KAAK,CAAC,OAAO,EAAS,KAAK,KAAK,MAAM,KAAK,QAAQ,EAAE,EAAU,EAAU,GAAG,CAAC,EAAU,CACvH,CAAC,EAAK,GAASA,EAAe,GAAc,CAAC,CACgI,OAAlL,MAAoB,CAAC,IAAM,EAAS,gBAAgB,CAAC,EAAQ,GAAc,CAAC,EAAG,EAAe,CAAC,UAAU,cAAc,EAAS,EAAG,CAAC,EAAS,EAAU,EAAU,EAAe,CAAC,CAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,MAAM,OAAO,OAAO,OAAO,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,OAAO,OAAO,CAAC,SAAS,EAAK,KAAK,EAAU,IAAqB,EAAK,MAAM,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,OAAO,OAAO,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,EAAS,IAAI,OAAO,GAAG,EAAU,IAAI,gBAAgB,EAAS,WAAW,GAAG,E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