{"version":3,"file":"StudioClock.DaM4nnPW.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/Cj1wkwz8SEuXHMuUWOMv/RTZEORiJhTCBocGBLPcB/StudioClock.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function parts(timeZone){const now=new Date;try{const time=new Intl.DateTimeFormat(\"en-GB\",{hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",hour12:false,timeZone}).format(now);const zone=new Intl.DateTimeFormat(\"en-GB\",{timeZone,timeZoneName:\"short\"}).formatToParts(now).find(p=>p.type===\"timeZoneName\")?.value??\"\";return{time,zone};}catch{return{time:\"--:--:--\",zone:\"\"};}}function Globe({color}){return /*#__PURE__*/_jsxs(\"svg\",{width:\"12\",height:\"12\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:color,strokeWidth:\"1.6\",\"aria-hidden\":\"true\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"12\",cy:\"12\",r:\"10\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M2 12h20\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z\"})]});}/**\n * @framerIntrinsicWidth 160\n * @framerIntrinsicHeight 15\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n */export default function StudioClock(props){const{timeZone=\"Europe/Rome\",iconColor=\"#8D8D8D\",timeColor=\"#FFFFFF\",zoneColor=\"#8D8D8D\",align=\"flex-end\",style}=props;const[now,setNow]=useState(null);useEffect(()=>{setNow(parts(timeZone));const id=window.setInterval(()=>setNow(parts(timeZone)),1e3);return()=>window.clearInterval(id);},[timeZone]);const shown=now??{time:\"00:00:00\",zone:\"CEST\"};return /*#__PURE__*/_jsxs(\"div\",{role:\"timer\",\"aria-label\":now?`Studio time ${shown.time} ${shown.zone}`:\"Studio time\",style:{...style,position:\"relative\",display:\"flex\",alignItems:\"center\",justifyContent:align,gap:7,whiteSpace:\"nowrap\",width:\"100%\",fontFamily:\"Inter, sans-serif\",fontSize:12,lineHeight:\"1.2em\",fontFeatureSettings:\"'tnum' on\"},children:[/*#__PURE__*/_jsx(Globe,{color:iconColor}),/*#__PURE__*/_jsxs(\"span\",{style:{opacity:now?1:0,transition:\"opacity 0.4s ease\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:timeColor},children:shown.time}),/*#__PURE__*/_jsx(\"span\",{style:{color:zoneColor,marginLeft:\"0.4em\"},children:shown.zone})]})]});}addPropertyControls(StudioClock,{timeZone:{type:ControlType.String,title:\"Time zone\",defaultValue:\"Europe/Rome\",description:\"IANA name, e.g. Europe/Rome\"},iconColor:{type:ControlType.Color,title:\"Icon\",defaultValue:\"#8D8D8D\"},timeColor:{type:ControlType.Color,title:\"Time\",defaultValue:\"#FFFFFF\"},zoneColor:{type:ControlType.Color,title:\"Zone\",defaultValue:\"#8D8D8D\"},align:{type:ControlType.Enum,title:\"Align\",defaultValue:\"flex-end\",options:[\"flex-start\",\"center\",\"flex-end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StudioClock\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"160\",\"framerIntrinsicHeight\":\"15\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StudioClock.map"],"mappings":"sMAAmJ,SAAS,EAAM,EAAS,CAAC,IAAM,EAAI,IAAI,KAAK,GAAG,CAA6Q,MAAM,CAAC,KAAxQ,IAAI,KAAK,eAAe,QAAQ,CAAC,KAAK,UAAU,OAAO,UAAU,OAAO,UAAU,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