{"version":3,"file":"LondonDate.CVltjDs6.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/ESfxYm102B71qWXr9Kv4/3SZ3AB5oEnr72Q4oUsUM/LondonDate.js"],"sourcesContent":["// Text component showing current date in London format: Day, Month Date, Year\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function LondonDate(props){const{textColor,font}=props;const[dateString,setDateString]=useState(\"\");useEffect(()=>{if(typeof window===\"undefined\")return;const updateDate=()=>{const londonDate=new Date().toLocaleString(\"en-GB\",{timeZone:\"Europe/London\",weekday:\"long\",year:\"numeric\",month:\"long\",day:\"numeric\"});const parts=londonDate.split(\" \");const dayOfWeek=parts[0].replace(\",\",\"\");const day=parts[1];const month=parts[2];const year=parts[3];const formatted=`${dayOfWeek}, ${month} ${day}, ${year}`;startTransition(()=>setDateString(formatted));};updateDate();const interval=setInterval(updateDate,6e4);return()=>clearInterval(interval);},[]);const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsx(\"span\",{style:{...props.style,...isFixedWidth?{}:{width:\"max-content\"},color:textColor,...font},children:dateString||\"Loading...\"});}addPropertyControls(LondonDate,{textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LondonDate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LondonDate.map"],"mappings":"4LAIG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,YAAU,QAAM,EAAW,CAAC,EAAW,GAAeA,EAAS,EAAE,EAAE,MAAc,CAAC,GAAU,IAAS,OAAY,OAAO,IAAM,MAAe,CAAyI,IAAM,EAA7H,IAAI,KAAK,CAAA,CAAE,eAAe,QAAQ,CAAC,SAAS,gBAAgB,QAAQ,OAAO,KAAK,UAAU,MAAM,OAAO,IAAI,SAAS,CAAwB,CAAC,CAAC,MAAM,GAAG,EAAQ,EAAU,EAAM,EAAE,CAAC,QAAQ,IAAI,EAAE,EAAQ,EAAI,EAAM,GAAkD,EAAU,GAAG,EAAU,IAA1D,EAAM,GAA8D,GAAG,EAAI,IAAvD,EAAM,KAA4D,MAAoB,EAAc,CAAS,CAAC,CAAE,EAAE,EAAW,EAAE,IAAM,EAAS,YAAY,EAAW,GAAG,EAAE,UAAU,cAAc,CAAQ,CAAE,EAAE,CAAC,CAAC,EAAE,IAAM,EAAa,GAAO,OAAO,EAAM,MAAM,QAAQ,OAAO,OAAoB,EAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,GAAG,EAAa,CAAC,EAAE,CAAC,MAAM,aAAa,EAAE,MAAM,EAAU,GAAG,CAAI,EAAE,SAAS,GAAY,YAAY,CAAC,CAAE,qBAHx0B,IAAsD,IAAoD,EAG+tB,EAAoB,EAAW,CAAC,UAAU,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,aAAa,SAAS,EAAE,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,aAAa,CAAC,SAAS,OAAO,QAAQ,SAAS,cAAc,UAAU,WAAW,OAAO,EAAE,SAAS,WAAW,gBAAgB,YAAY,CAAC,CAAC"}