{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/vMncbXNiK8Rx8mDQFDIS/8MDEHIy0vRoEEAtcekgM/Countdown_1.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function CountdownTimer(props){const{endDate,font,fontColor,labelFont,labelColor,showDays,showHours,showMinutes,showSeconds,gap,endMessage}=props;const calculateTimeLeft=()=>{const difference=new Date(endDate.replace(\":\",\"T\")).getTime()-new Date().getTime();if(difference<=0){return null// Expirado\n;}return{days:Math.floor(difference/(1e3*60*60*24)),hours:Math.floor(difference/(1e3*60*60)%24),minutes:Math.floor(difference/1e3/60%60),seconds:Math.floor(difference/1e3%60)};};const[timeLeft,setTimeLeft]=useState(calculateTimeLeft());useEffect(()=>{const timer=setTimeout(()=>{setTimeLeft(calculateTimeLeft());},1e3);return()=>clearTimeout(timer);},[timeLeft])// Atualiza quando o tempo mudar\n;if(!timeLeft){return /*#__PURE__*/_jsx(\"div\",{style:{...font,color:fontColor},children:endMessage});}const timerComponents=[];const labels=[];if(showDays){timerComponents.push(/*#__PURE__*/_jsx(\"div\",{style:{...font,color:fontColor},children:timeLeft.days},\"Days\"));labels.push(/*#__PURE__*/_jsx(\"div\",{style:{...labelFont,color:labelColor},children:\"days\"},\"Days-label\"));}if(showHours){timerComponents.push(/*#__PURE__*/_jsx(\"div\",{style:{...font,color:fontColor},children:timeLeft.hours},\"Hours\"));labels.push(/*#__PURE__*/_jsx(\"div\",{style:{...labelFont,color:labelColor},children:\"hours\"},\"hours-label\"));}if(showMinutes){timerComponents.push(/*#__PURE__*/_jsx(\"div\",{style:{...font,color:fontColor},children:timeLeft.minutes},\"minutes\"));labels.push(/*#__PURE__*/_jsx(\"div\",{style:{...labelFont,color:labelColor},children:\"minutes\"},\"minutes-label\"));}if(showSeconds){timerComponents.push(/*#__PURE__*/_jsx(\"div\",{style:{...font,color:fontColor},children:timeLeft.seconds},\"seconds\"));labels.push(/*#__PURE__*/_jsx(\"div\",{style:{...labelFont,color:labelColor},children:\"seconds\"},\"seconds-label\"));}return /*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",gap:`${gap}px`,justifyContent:\"center\",alignItems:\"center\"},children:timerComponents.map((component,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{textAlign:\"center\"},children:[component,labels[index]]},index))});}CountdownTimer.defaultProps={endDate:\"2025-04-21T09:00:00\",font:{fontFamily:\"Inter\",fontWeight:\"Regular\",fontSize:16,lineHeight:\"1.5em\"},fontColor:\"#000\",labelFont:{fontFamily:\"Inter\",fontWeight:\"Regular\",fontSize:12,lineHeight:\"1.5em\"},labelColor:\"#000\",showDays:true,showHours:true,showMinutes:true,showSeconds:true,gap:8,endMessage:\"Time's up!\"};addPropertyControls(CountdownTimer,{endDate:{type:ControlType.String,title:\"End Date\",placeholder:\"YYYY-MM-DD:HH:MM:SS\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:CountdownTimer.defaultProps.font,controls:\"extended\"},fontColor:{type:ControlType.Color,title:\"Font Color\",defaultValue:\"#000\"},labelFont:{type:ControlType.Font,title:\"Label Font\",defaultValue:CountdownTimer.defaultProps.labelFont,controls:\"extended\"},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#000\"},showDays:{type:ControlType.Boolean,title:\"Show Days\",defaultValue:true},showHours:{type:ControlType.Boolean,title:\"Show Hours\",defaultValue:true},showMinutes:{type:ControlType.Boolean,title:\"Show Minutes\",defaultValue:true},showSeconds:{type:ControlType.Boolean,title:\"Show Seconds\",defaultValue:true},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,max:100,step:1},endMessage:{type:ControlType.String,title:\"End Message\",placeholder:\"Time's up!\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"CountdownTimer\":{\"type\":\"reactComponent\",\"name\":\"CountdownTimer\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetad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,WAAW,OAAO,SAAS,GAAK,UAAU,GAAK,YAAY,GAAK,YAAY,GAAK,IAAI,EAAE,WAAW,YAAY,EAAE0B,EAAoB1B,EAAe,CAAC,QAAQ,CAAC,KAAK2B,EAAY,OAAO,MAAM,WAAW,YAAY,qBAAqB,EAAE,KAAK,CAAC,KAAKA,EAAY,KAAK,MAAM,OAAO,aAAa3B,EAAe,aAAa,KAAK,SAAS,UAAU,EAAE,UAAU,CAAC,KAAK2B,EAAY,MAAM,MAAM,aAAa,aAAa,MAAM,EAAE,UAAU,CAAC,KAAKA,EAAY,KAAK,MAAM,aAAa,aAAa3B,EAAe,aAAa,UAAU,SAAS,UAAU,EAAE,WAAW,CAAC,KAAK2B,EAAY,MAAM,MAAM,cAAc,aAAa,MAAM,EAAE,SAAS,CAAC,KAAKA,EAAY,QAAQ,MAAM,YAAY,aAAa,EAAI,EAAE,UAAU,CAAC,KAAKA,EAAY,QAAQ,MAAM,aAAa,aAAa,EAAI,EAAE,YAAY,CAAC,KAAKA,EAAY,QAAQ,MAAM,eAAe,aAAa,EAAI,EAAE,YAAY,CAAC,KAAKA,EAAY,QAAQ,MAAM,eAAe,aAAa,EAAI,EAAE,IAAI,CAAC,KAAKA,EAAY,OAAO,MAAM,MAAM,aAAa,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,WAAW,CAAC,KAAKA,EAAY,OAAO,MAAM,cAAc,YAAY,YAAY,CAAC,CAAC",
  "names": ["CountdownTimer", "props", "endDate", "font", "fontColor", "labelFont", "labelColor", "showDays", "showHours", "showMinutes", "showSeconds", "gap", "endMessage", "calculateTimeLeft", "difference", "timeLeft", "setTimeLeft", "ye", "ue", "timer", "p", "timerComponents", "labels", "component", "index", "u", "addPropertyControls", "ControlType"]
}
