{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/bDNGf9BRW67sQCuno5zs/h3urLUQVgdC60tut8UPL/Time_Date.js"],
  "sourcesContent": ["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{localeOptions,containerStyles,fontStack}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";/**\n * TIME\n *\n * @framerIntrinsicWidth 140\n * @framerIntrinsicHeight 20\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export function Time(props){const{outputType,fontFamily,fontSize,fontWeight,localeType,customLocale,timeFormat,showYear,showWeekday,showHours,showMinutes,showSeconds,monthFormat,color,font,alignment}=props;const[rerenderOutputKey,setRerenderOutputKey]=React.useState(`${Math.random()}`);const timerRef=React.useRef();const text=React.useMemo(()=>{const locale=localeType===\"custom\"?[customLocale]:[];let formatOptions;switch(outputType){case\"date\":formatOptions={weekday:showWeekday?\"long\":undefined,day:\"numeric\",month:monthFormat,year:showYear?\"numeric\":undefined};break;case\"time\":formatOptions={hour:showHours?\"numeric\":undefined,minute:showMinutes?\"numeric\":undefined,second:showSeconds&&showMinutes?\"numeric\":undefined,hour12:timeFormat===\"12h\"};break;default:console.error(`Unsupported outputType: ${outputType}`);break;}return new Intl.DateTimeFormat(locale,formatOptions).format(new Date);},[outputType,localeType,customLocale,timeFormat,showYear,showWeekday,showHours,showMinutes,showSeconds,monthFormat,rerenderOutputKey,]);React.useEffect(()=>{if(outputType===\"time\"){const timer=setInterval(()=>setRerenderOutputKey(`${Math.random()}`),(60-new Date().getSeconds())*1e3);timerRef.current=timer;return()=>{if(timer){return clearInterval(timer);}};}},[timerRef.current,outputType]);return /*#__PURE__*/ _jsx(\"div\",{style:{...containerStyles,color,fontFamily:fontStack,fontWeight:500,fontSize:16,...font},children:/*#__PURE__*/ _jsx(\"span\",{style:{width:\"100%\"},children:text})});}Time.defaultProps={height:20,width:140,outputType:\"time\",localeType:\"auto\",customLocale:\"en-US\",color:\"#999\",timeFormat:\"24h\",showYear:true,showWeekday:true,showHours:true,showMinutes:true,showSeconds:false,monthFormat:\"long\",alignment:\"center\"};Time.displayName=\"Time & Date\";addPropertyControls(Time,{outputType:{title:\"Type\",type:ControlType.Enum,displaySegmentedControl:true,options:[\"date\",\"time\"],optionTitles:[\"Date\",\"Time\"],defaultValue:Time.defaultProps.outputType},showWeekday:{title:\"Weekday\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showWeekday,hidden:props=>props.outputType!==\"date\"},monthFormat:{title:\"Month\",type:ControlType.Enum,options:[\"short\",\"long\",\"numeric\"],optionTitles:[\"Short\",\"Long\",\"Numeric\"],defaultValue:Time.defaultProps.monthFormat,hidden:props=>props.outputType!==\"date\"},showYear:{title:\"Year\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showYear,hidden:props=>props.outputType!==\"date\"},timeFormat:{title:\"Format\",type:ControlType.Enum,options:[\"12h\",\"24h\"],optionTitles:[\"12h\",\"24h\"],displaySegmentedControl:true,defaultValue:Time.defaultProps.timeFormat,hidden:props=>props.outputType!==\"time\"},showHours:{title:\"Hours\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showHours,hidden:props=>props.outputType!==\"time\"},showMinutes:{title:\"Minutes\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showMinutes,hidden:props=>props.outputType!==\"time\"},showSeconds:{title:\"Seconds\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:Time.defaultProps.showSeconds,hidden:props=>props.outputType!==\"time\"||!props.showMinutes},localeType:{title:\"Locale\",type:ControlType.Enum,displaySegmentedControl:true,options:[\"custom\",\"auto\"],optionTitles:[\"Custom\",\"Auto\"],defaultValue:Time.defaultProps.localeType},customLocale:{title:\" \",type:ControlType.Enum,options:Object.keys(localeOptions).sort(),optionTitles:Object.keys(localeOptions).sort().map(key=>localeOptions[key]),hidden:props=>props.localeType!==\"custom\",defaultValue:\"en\"},font:{// @ts-expect-error \u2013\u00A0Internal\ntype:ControlType.Font,controls:\"extended\"},color:{type:ControlType.Color,defaultValue:Time.defaultProps.color}});\nexport const __FramerMetadata__ = {\"exports\":{\"Time\":{\"type\":\"reactComponent\",\"name\":\"Time\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"140\",\"framerIntrinsicHeight\":\"20\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Time_Date.map"],
  "mappings": "uIAQW,SAASA,EAAKC,EAAM,CAAC,GAAK,CAAC,WAAAC,EAAW,WAAAC,EAAW,SAAAC,EAAS,WAAAC,EAAW,WAAAC,EAAW,aAAAC,EAAa,WAAAC,EAAW,SAAAC,EAAS,YAAAC,EAAY,UAAAC,EAAU,YAAAC,EAAY,YAAAC,EAAY,YAAAC,EAAY,MAAAC,EAAM,KAAAC,EAAK,UAAAC,CAAS,EAAEhB,EAAW,CAACiB,EAAkBC,CAAoB,EAAQC,EAAS,GAAG,KAAK,OAAO,CAAC,EAAE,EAAQC,EAAeC,EAAO,EAAQC,EAAWC,EAAQ,IAAI,CAAC,IAAMC,EAAOnB,IAAa,SAAS,CAACC,CAAY,EAAE,CAAC,EAAMmB,EAAc,OAAOxB,EAAW,CAAC,IAAI,OAAOwB,EAAc,CAAC,QAAQhB,EAAY,OAAO,OAAU,IAAI,UAAU,MAAMI,EAAY,KAAKL,EAAS,UAAU,MAAS,EAAE,MAAM,IAAI,OAAOiB,EAAc,CAAC,KAAKf,EAAU,UAAU,OAAU,OAAOC,EAAY,UAAU,OAAU,OAAOC,GAAaD,EAAY,UAAU,OAAU,OAAOJ,IAAa,KAAK,EAAE,MAAM,QAA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a,EAAE,KAAK,EAAE,IAAIC,GAAKD,EAAcC,CAAG,CAAC,EAAE,OAAOlC,GAAOA,EAAM,aAAa,SAAS,aAAa,IAAI,EAAE,KAAK,CAC/mH,KAAKgC,EAAY,KAAK,SAAS,UAAU,EAAE,MAAM,CAAC,KAAKA,EAAY,MAAM,aAAajC,EAAK,aAAa,KAAK,CAAC,CAAC",
  "names": ["Time", "props", "outputType", "fontFamily", "fontSize", "fontWeight", "localeType", "customLocale", "timeFormat", "showYear", "showWeekday", "showHours", "showMinutes", "showSeconds", "monthFormat", "color", "font", "alignment", "rerenderOutputKey", "setRerenderOutputKey", "ye", "timerRef", "pe", "text", "se", "locale", "formatOptions", "ue", "timer", "p", "containerStyles", "fontStack", "addPropertyControls", "ControlType", "localeOptions", "key"]
}
