{"version":3,"file":"CountdownTimer.BpWBFJes.mjs","names":["useState","Fragment"],"sources":["https:/framerusercontent.com/modules/3K1Y9JqltES7LPicrs63/lih23U6JLBGFHZ7Jqyu0/CountdownTimer.js"],"sourcesContent":["// Create a new code component named \"CountdownTimer\" using the provided source code as the base, keeping code structure/property controls/styling the same, but always showing three frames (Days, Hours, Minutes) with two blinking separator columns and removing showDaysAndHours logic.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment,useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function CountdownTimer(props){const{targetDate=new Date(Date.now()+24*60*60*1e3+18*60*60*1e3).toISOString(),frameFill={type:\"solid\",color:\"#2A2A2A\",gradientFrom:\"#FF6B4A\",gradientTo:\"#FF8E53\",gradientAngle:135,image:{src:\"https://framerusercontent.com/images/GfGkADagM4KEibNcIiRUWlfrR0.jpg\",alt:\"Gradient 1 - Blue\"}},numberColor,labelColor,separatorColor,numberFont,labelFont,daysLabel,hoursLabel,minutesLabel,borderRadius,separatorRadius,separatorGap=40,separatorSize=24,separatorTopOffset=0,separatorDotGap=20,timeGap=20}=props;const[timeLeft,setTimeLeft]=useState({days:0,hours:0,minutes:0});const[tic,setTic]=useState(false);useEffect(()=>{if(typeof window===\"undefined\")return;const calculateTimeLeft=()=>{const difference=new Date(targetDate).getTime()-Date.now();if(difference>0){const days=Math.floor(difference/(1e3*60*60*24));const hours=Math.floor(difference%(1e3*60*60*24)/(1e3*60*60));const minutes=Math.floor(difference%(1e3*60*60)/(1e3*60));startTransition(()=>setTimeLeft({days,hours,minutes}));startTransition(()=>setTic(prev=>!prev));}else{startTransition(()=>setTimeLeft({days:0,hours:0,minutes:0}));}};calculateTimeLeft();const timer=setInterval(calculateTimeLeft,1e3);return()=>clearInterval(timer);},[targetDate]);const getFrameStyle=()=>{if(frameFill.type===\"image\"){return{backgroundImage:`url(${frameFill.image.src})`,backgroundSize:\"cover\",backgroundPosition:\"center\"};}else if(frameFill.type===\"gradient\"){return{background:`linear-gradient(${frameFill.gradientAngle}deg, ${frameFill.gradientFrom}, ${frameFill.gradientTo})`};}else{return{background:frameFill.color};}};const frameStyle=getFrameStyle();const timeFrames=[{value:String(timeLeft.days).padStart(2,\"0\"),label:daysLabel},{value:String(timeLeft.hours).padStart(2,\"0\"),label:hoursLabel},{value:String(timeLeft.minutes).padStart(2,\"0\"),label:minutesLabel}];return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",gap:separatorGap,position:\"relative\"},children:timeFrames.map((frame,index)=>/*#__PURE__*/_jsxs(Fragment,{children:[/*#__PURE__*/_jsxs(\"div\",{style:{...frameStyle,borderRadius:borderRadius,flex:1,height:\"100%\",display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:timeGap},children:[/*#__PURE__*/_jsx(\"div\",{style:{color:numberColor,...numberFont,lineHeight:\"0.85em\"},children:frame.value}),/*#__PURE__*/_jsx(\"div\",{style:{color:labelColor,...labelFont,lineHeight:\"1em\"},children:frame.label})]}),index<timeFrames.length-1&&/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",gap:separatorDotGap,alignItems:\"center\",alignSelf:\"flex-start\",marginTop:separatorTopOffset},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:separatorSize,height:separatorSize,borderRadius:separatorRadius,backgroundColor:separatorColor,opacity:tic?1:0}}),/*#__PURE__*/_jsx(\"div\",{style:{width:separatorSize,height:separatorSize,borderRadius:separatorRadius,backgroundColor:separatorColor,opacity:tic?1:0}})]})]},index))});}addPropertyControls(CountdownTimer,{targetDate:{type:ControlType.Date,title:\"Target Date\",displayTime:true},frameFill:{type:ControlType.Object,title:\"Frame Fill\",controls:{type:{type:ControlType.Enum,title:\"Type\",options:[\"solid\",\"gradient\",\"image\"],optionTitles:[\"Color\",\"Gradient\",\"Image\"],defaultValue:\"solid\",displaySegmentedControl:true},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#2A2A2A\",hidden:({type})=>type!==\"solid\"},gradientFrom:{type:ControlType.Color,title:\"From\",defaultValue:\"#FF6B4A\",hidden:({type})=>type!==\"gradient\"},gradientTo:{type:ControlType.Color,title:\"To\",defaultValue:\"#FF8E53\",hidden:({type})=>type!==\"gradient\"},gradientAngle:{type:ControlType.Number,title:\"Angle\",defaultValue:135,min:0,max:360,step:1,unit:\"\\xb0\",hidden:({type})=>type!==\"gradient\"},image:{type:ControlType.ResponsiveImage,title:\"Image\",hidden:({type})=>type!==\"image\"}}},numberColor:{type:ControlType.Color,title:\"Number Color\",defaultValue:\"#FF6B4A\"},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#FFFFFF\"},separatorColor:{type:ControlType.Color,title:\"Separator Color\",defaultValue:\"#FF6B4A\"},separatorRadius:{type:ControlType.Number,title:\"Separator Radius\",defaultValue:12,min:0,max:12,step:1,unit:\"px\"},separatorSize:{type:ControlType.Number,title:\"Separator Size\",defaultValue:24,min:4,max:100,step:1,unit:\"px\"},separatorTopOffset:{type:ControlType.Number,title:\"Dots Top Offset\",defaultValue:0,min:0,max:500,step:1,unit:\"px\"},separatorDotGap:{type:ControlType.Number,title:\"Dots Gap\",defaultValue:20,min:0,max:200,step:1,unit:\"px\"},separatorGap:{type:ControlType.Number,title:\"Separator Gap\",defaultValue:40,min:0,max:200,step:1,unit:\"px\"},numberFont:{type:ControlType.Font,title:\"Number Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"140px\",variant:\"Extra Bold\",letterSpacing:\"-0.02em\"}},labelFont:{type:ControlType.Font,title:\"Label Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"32px\",variant:\"Medium\",letterSpacing:\"0em\"}},daysLabel:{type:ControlType.String,title:\"Days Label\",defaultValue:\"Days\"},hoursLabel:{type:ControlType.String,title:\"Hours Label\",defaultValue:\"Hours\"},minutesLabel:{type:ControlType.String,title:\"Minutes Label\",defaultValue:\"Minutes\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:16,min:0,max:50,step:1,unit:\"px\"},timeGap:{type:ControlType.Number,title:\"Time Gap\",defaultValue:20,min:0,max:100,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CountdownTimer\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"800\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"300\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountdownTimer.map"],"mappings":"oNAOG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,IAAI,KAAK,KAAK,IAAI,EAAE,KAAM,GAAG,IAAI,KAAM,GAAG,GAAG,CAAC,CAAC,YAAY,EAAE,YAAU,CAAC,KAAK,QAAQ,MAAM,UAAU,aAAa,UAAU,WAAW,UAAU,cAAc,IAAI,MAAM,CAAC,IAAI,sEAAsE,IAAI,mBAAmB,CAAC,EAAE,cAAY,aAAW,iBAAe,aAAW,YAAU,YAAU,aAAW,eAAa,eAAa,kBAAgB,eAAa,GAAG,gBAAc,GAAG,qBAAmB,EAAE,kBAAgB,GAAG,UAAQ,IAAI,EAAW,CAAC,EAAS,GAAaA,EAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,EAAO,CAAC,EAAI,GAAQA,EAAS,EAAK,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAsB,CAAC,IAAM,EAAW,IAAI,KAAK,CAAU,CAAC,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE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