{"version":3,"file":"DayTimeDisplay.C38_psUG.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/fbIcqIJpxPS7qGaNlan1/177TItz3ulCHyB8VLcxg/DayTimeDisplay.js"],"sourcesContent":["// Date, month and time component that displays current date, month and time\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function DayTimeDisplay(props){const{showDay=false,showTime=true,showSeconds=false,format24Hour=true,separator=\" • \",textColor=\"#000000\",font}=props;const timeZone=\"Australia/Brisbane\";const[currentTime,setCurrentTime]=useState(new Date);useEffect(()=>{const timer=setInterval(()=>{startTransition(()=>{setCurrentTime(new Date);});},1e3);return()=>clearInterval(timer);},[]);const formatDay=date=>{return date.toLocaleDateString(undefined,{weekday:\"long\",timeZone});};const formatTime=date=>{const options={hour:\"2-digit\",minute:\"2-digit\",hour12:!format24Hour,timeZone};if(showSeconds){options.second=\"2-digit\";}return date.toLocaleTimeString(undefined,options);};const parts=[];// Date part\nif(showDay){parts.push(formatDay(currentTime));}if(showTime){parts.push(formatTime(currentTime));}const displayText=parts.join(separator);return /*#__PURE__*/_jsx(\"div\",{style:{...props.style,color:textColor,width:\"max-content\",minWidth:\"max-content\",...font},children:displayText});}addPropertyControls(DayTimeDisplay,{showDay:{type:ControlType.Boolean,title:\"Show Day\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showTime:{type:ControlType.Boolean,title:\"Show Time\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showSeconds:{type:ControlType.Boolean,title:\"Show Seconds\",defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\",hidden:({showTime})=>!showTime},format24Hour:{type:ControlType.Boolean,title:\"24 Hour Format\",defaultValue:true,enabledTitle:\"24h\",disabledTitle:\"12h\",hidden:({showTime})=>!showTime},separator:{type:ControlType.String,title:\"Separator\",defaultValue:\" • \",placeholder:\"Enter separator...\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"16px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DayTimeDisplay\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DayTimeDisplay.map"],"mappings":"wLAIG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,UAAQ,GAAM,WAAS,GAAK,cAAY,GAAM,eAAa,GAAK,YAAU,MAAM,YAAU,UAAU,QAAM,EAAY,EAAS,qBAA0B,CAAC,EAAY,GAAgBA,EAAS,IAAI,KAAK,CAAC,MAAc,CAAC,IAAM,EAAM,gBAAgB,CAAC,MAAoB,CAAC,EAAe,IAAI,KAAK,EAAG,EAAG,IAAI,CAAC,UAAU,cAAc,EAAM,EAAG,EAAE,CAAC,CAAC,IAAM,EAAU,GAAc,EAAK,mBAAmB,IAAA,GAAU,CAAC,QAAQ,OAAO,WAAS,CAAC,CAAS,EAAW,GAAM,CAAC,IAAM,EAAQ,CAAC,KAAK,UAAU,OAAO,UAAU,OAAO,CAAC,EAAa,WAAS,CAA2C,OAAvC,IAAa,EAAQ,OAAO,WAAkB,EAAK,mBAAmB,IAAA,GAAU,EAAQ,EAAS,EAAM,EAAE,CACrrB,GAAS,EAAM,KAAK,EAAU,EAAY,CAAC,CAAK,GAAU,EAAM,KAAK,EAAW,EAAY,CAAC,CAAE,IAAM,EAAY,EAAM,KAAK,EAAU,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,MAAM,MAAM,EA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