{"version":3,"file":"StudioClock.C-WVTvyZ.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/9RK6VJQVuUhIOGefjY1h/NI0pboCKSyNVEFqWnO75/StudioClock.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Live studio time, set in the mono label style. Ticks every second.\n/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StudioClock(props){const{city,timeZone,color,font,showSeconds}=props;const fmt=()=>{try{return new Intl.DateTimeFormat(\"en-US\",{timeZone,hour:\"2-digit\",minute:\"2-digit\",second:showSeconds?\"2-digit\":undefined,hour12:false}).format(new Date);}catch(e){return\"--:--\";}};const[now,setNow]=useState(fmt);useEffect(()=>{const t=setInterval(()=>setNow(fmt()),1e3);return()=>clearInterval(t);},[timeZone,showSeconds]);return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",gap:10,alignItems:\"center\",whiteSpace:\"nowrap\",color,...font,fontVariantNumeric:\"tabular-nums\",...props.style},children:[/*#__PURE__*/_jsx(\"span\",{children:city}),/*#__PURE__*/_jsx(\"span\",{style:{opacity:.45},children:\"/\"}),/*#__PURE__*/_jsx(\"span\",{children:now})]});}StudioClock.defaultProps={city:\"NEW YORK\",timeZone:\"America/New_York\",color:\"#1A1A1A\",showSeconds:true};addPropertyControls(StudioClock,{city:{type:ControlType.String,title:\"City\"},timeZone:{type:ControlType.String,title:\"Time Zone\"},color:{type:ControlType.Color,title:\"Color\"},showSeconds:{type:ControlType.Boolean,title:\"Seconds\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"monospace\",defaultValue:{fontSize:12,letterSpacing:\"0.04em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StudioClock\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupport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