{"version":3,"file":"Singel_Countdown_Timer.CVBLpyOS.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/zf4kU4PujnFoMU5mNmV7/SCJ8DfutmbcJxIxlmzjx/Singel_Countdown_Timer.js"],"sourcesContent":["import{jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function CountdownTimer(props){const{initialMinutes,initialSeconds,textSize}=props;const[timeLeft,setTimeLeft]=useState({minutes:initialMinutes,seconds:initialSeconds});useEffect(()=>{const timer=setInterval(()=>{setTimeLeft(prevTime=>{if(prevTime.minutes===0&&prevTime.seconds===0){clearInterval(timer);return prevTime;}const newSeconds=prevTime.seconds-1;if(newSeconds<0){return{minutes:prevTime.minutes-1,seconds:59};}return{minutes:prevTime.minutes,seconds:newSeconds};});},1e3);return()=>clearInterval(timer)// Cleanup on unmount\n;},[]);const minuteLabel=timeLeft.minutes===1?\"min\":\"mins\";const secondLabel=timeLeft.seconds===1?\"sec\":\"secs\";return /*#__PURE__*/_jsxs(\"div\",{style:{fontFamily:\"Manrope, sans-serif\",fontSize:textSize,color:\"#FFFFFF\",fontWeight:\"Medium\",textAlign:\"center\"},children:[timeLeft.minutes,\" \",minuteLabel,\" : \",timeLeft.seconds,\" \",secondLabel]});}// Property Controls for Framer UI\naddPropertyControls(CountdownTimer,{initialMinutes:{type:ControlType.Number,defaultValue:5,min:0,max:60,step:1,title:\"Minutes\"},initialSeconds:{type:ControlType.Number,defaultValue:30,min:0,max:59,step:1,title:\"Seconds\"},textSize:{type:ControlType.Number,defaultValue:32,min:10,max:100,step:1,title:\"Text Size\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"CountdownTimer\":{\"type\":\"reactComponent\",\"name\":\"CountdownTimer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Singel_Countdown_Timer.map"],"mappings":"kLAAuI,SAAgB,EAAe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