{"version":3,"file":"LiveClock.Cxvtihdz.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/QWhKWyJBsfXnWdXgmqEo/A21H8aZXp2WW6A1tow6m/LiveClock.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";function hhmm(date,timeZone){try{return new Intl.DateTimeFormat(\"en-GB\",{timeZone,hour:\"2-digit\",minute:\"2-digit\",hourCycle:\"h23\"}).format(date);}catch{return new Intl.DateTimeFormat(\"en-GB\",{hour:\"2-digit\",minute:\"2-digit\",hourCycle:\"h23\"}).format(date);}}/**\n * Local time for the shop's time zone, for example \"Open now · 14:32\".\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 140\n * @framerIntrinsicHeight 22\n */export default function LiveClock(props){const{timeZone=\"America/New_York\",prefix=\"Open now \\xb7 \",suffix=\"\",font,color=\"inherit\",style}=props;const isStatic=useIsStaticRenderer();const[now,setNow]=React.useState(null);React.useEffect(()=>{if(isStatic)return;setNow(new Date);const id=window.setInterval(()=>setNow(new Date),15e3);return()=>window.clearInterval(id);},[isStatic]);const t=now?hhmm(now,timeZone):\"14:32\";return /*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-block\",whiteSpace:\"nowrap\",fontVariantNumeric:\"tabular-nums\",color,...font,...style},children:[prefix,/*#__PURE__*/_jsx(\"time\",{suppressHydrationWarning:true,children:t}),suffix]});}addPropertyControls(LiveClock,{timeZone:{type:ControlType.String,title:\"Time Zone\",defaultValue:\"America/New_York\",description:\"IANA name, e.g. Europe/London\"},prefix:{type:ControlType.String,title:\"Before Time\",defaultValue:\"Open now \\xb7 \"},suffix:{type:ControlType.String,title:\"After Time\",defaultValue:\"\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:15,lineHeight:\"1.4em\"}},color:{type:ControlType.Color,title:\"Text Colour\",defaultValue:\"#F1F2EF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LiveClock\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerIntrinsicHeight\":\"22\",\"framerIntrinsicWidth\":\"140\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LiveClock.map"],"mappings":"8MAA6J,SAAS,EAAK,EAAK,EAAS,CAAC,GAAG,CAAC,OAAO,IAAI,KAAK,eAAe,QAAQ,CAAC,WAAS,KAAK,UAAU,OAAO,UAAU,UAAU,KAAK,CAAC,CAAC,CAAC,OAAO,CAAI,CAAE,MAAM,CAAC,OAAO,IAAI,KAAK,eAAe,QAAQ,CAAC,KAAK,UAAU,OAAO,UAAU,UAAU,KAAK,CAAC,CAAC,CAAC,OAAO,CAAI,CAAE,CAAC,CAO1Z,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,WAAS,mBAAmB,SAAO,cAAiB,SAAO,GAAG,OAAK,QAAM,UAAU,SAAO,EAAY,EAAS,EAAoB,EAAO,CAAC,EAAI,GAAQA,EAAe,IAAI,EAAE,MAAoB,CAAC,GAAG,EAAS,OAAO,EAAO,IAAI,IAAI,EAAE,IAAM,EAAG,EAAO,gBAAgB,EAAO,IAAI,IAAI,EAAE,IAAI,EAAE,UAAU,EAAO,cAAc,CAAE,CAAE,EAAE,CAAC,CAAQ,CAAC,EAAE,IAAM,EAAE,EAAI,EAAK,EAAI,CAAQ,EAAE,QAAQ,OAAoB,EAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,eAAe,WAAW,SAAS,mBAAmB,eAAe,QAAM,GAAG,EAAK,GAAG,CAAK,EAAE,SAAS,CAAC,EAAoB,EAAK,OAAO,CAAC,yBAAyB,GAAK,SAAS,CAAC,CAAC,EAAE,CAAM,CAAC,CAAC,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