{"version":3,"file":"DynamicDate.DUtLH6pr.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/gRXxnzwTUrdHJTAgozx7/46GUVdt8NjOCwAoiiwHJ/DynamicDate.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Dynamic Date Display\n * Shows the date of the next day after 8pm EST, otherwise shows current date\n * Format: THURSDAY, APRIL 30TH, 2026 | 8PM EST\n * \n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 60\n * \n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function DynamicDate(props){const{backgroundColor=\"#0D0D0D\",textColor=\"#D4C4A0\",dividerColor=\"#D4C4A0\",showTimeLabel=true,timeLabel=\"8PM EST\",font,style,gap=12}=props;const[displayDate,setDisplayDate]=useState(\"\");useEffect(()=>{const updateDate=()=>{const now=new Date;// Get the current hour in EST using toLocaleString for accuracy\nconst estHour=parseInt(now.toLocaleString(\"en-US\",{timeZone:\"America/New_York\",hour:\"numeric\",hour12:false}),10);// Check if it's past 8pm EST (20:00)\nconst isAfter8PM=estHour>=20;// Get the target date in EST\nconst targetDateStr=now.toLocaleString(\"en-US\",{timeZone:\"America/New_York\",year:\"numeric\",month:\"numeric\",day:\"numeric\"});const targetDate=new Date(targetDateStr);// If after 8pm, add one day\nif(isAfter8PM){targetDate.setDate(targetDate.getDate()+1);}// Format the date\nconst formatted=formatDate(targetDate);startTransition(()=>setDisplayDate(formatted));};updateDate();// Update every second to ensure we catch the 8pm transition precisely\nconst interval=setInterval(updateDate,1e3);return()=>clearInterval(interval);},[]);const formatDate=date=>{const days=[\"SUNDAY\",\"MONDAY\",\"TUESDAY\",\"WEDNESDAY\",\"THURSDAY\",\"FRIDAY\",\"SATURDAY\"];const months=[\"JANUARY\",\"FEBRUARY\",\"MARCH\",\"APRIL\",\"MAY\",\"JUNE\",\"JULY\",\"AUGUST\",\"SEPTEMBER\",\"OCTOBER\",\"NOVEMBER\",\"DECEMBER\"];const dayName=days[date.getDay()];const monthName=months[date.getMonth()];const day=date.getDate();const year=date.getFullYear();// Get ordinal suffix\nconst suffix=getOrdinalSuffix(day);return`${dayName}, ${monthName} ${day}${suffix}, ${year}`;};const getOrdinalSuffix=day=>{if(day>3&&day<21)return\"TH\";switch(day%10){case 1:return\"ST\";case 2:return\"ND\";case 3:return\"RD\";default:return\"TH\";}};const isFixedWidth=style?.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"16px 24px\",borderRadius:4,gap,...isFixedWidth?{}:{minWidth:\"max-content\"}},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:font?.fontSize||\"24px\",fontWeight:font?.fontWeight||600,fontFamily:font?.fontFamily||\"Inter, sans-serif\",letterSpacing:font?.letterSpacing||\"0.02em\",lineHeight:font?.lineHeight||\"1.2em\",textTransform:\"uppercase\",whiteSpace:\"nowrap\"},children:displayDate}),showTimeLabel&&/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"span\",{style:{color:dividerColor,fontSize:font?.fontSize||\"24px\",fontWeight:font?.fontWeight||600,fontFamily:font?.fontFamily||\"Inter, sans-serif\",opacity:.8},children:\"|\"}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,fontSize:font?.fontSize||\"24px\",fontWeight:font?.fontWeight||600,fontFamily:font?.fontFamily||\"Inter, sans-serif\",letterSpacing:font?.letterSpacing||\"0.02em\",lineHeight:font?.lineHeight||\"1.2em\",textTransform:\"uppercase\",whiteSpace:\"nowrap\"},children:timeLabel})]})]});}addPropertyControls(DynamicDate,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#0D0D0D\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#D4C4A0\"},dividerColor:{type:ControlType.Color,title:\"Divider Color\",defaultValue:\"#D4C4A0\"},showTimeLabel:{type:ControlType.Boolean,title:\"Show Time\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},timeLabel:{type:ControlType.String,title:\"Time Label\",defaultValue:\"8PM EST\",hidden:({showTimeLabel})=>!showTimeLabel},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"24px\",variant:\"Semibold\",letterSpacing:\"0.02em\",lineHeight:\"1.2em\"}},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:64,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DynamicDate\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"600\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"60\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicDate.map"],"mappings":"sMAUG,SAAwB,EAAY,EAAM,CAAC,GAAK,CAAC,kBAAgB,UAAU,YAAU,UAAU,eAAa,UAAU,gBAAc,GAAK,YAAU,UAAU,OAAK,QAAM,MAAI,IAAI,EAAW,CAAC,EAAY,GAAgBA,EAAS,GAAG,CAAC,MAAc,CAAC,IAAM,MAAe,CAAC,IAAM,EAAI,IAAI,KAErR,EADQ,SAAS,EAAI,eAAe,QAAQ,CAAC,SAAS,mBAAmB,KAAK,UAAU,OAAO,GAAM,CAAC,CAAC,GAAG,EACtF,GACpB,EAAc,EAAI,eAAe,QAAQ,CAAC,SAAS,mBAAmB,KAAK,UAAU,MAAM,UAAU,IAAI,UAAU,CAAC,CAAO,EAAW,IAAI,KAAK,EAAc,CAChK,GAAY,EAAW,QAAQ,EAAW,SAAS,CAAC,EAAE,CACzD,IAAM,EA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