{"version":3,"file":"EventTimeDisplay.FUhP2raM.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/SnfshrBKFcpNHDmCaTxo/Nfw8fZ63C5UtnjllwY98/EventTimeDisplay.js"],"sourcesContent":["// URL parameter time display component that reads event_start_time from URL and displays formatted date and time\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function EventTimeDisplay(props){const{parameterName,prefixText,dateTimeFont,prefixFont,textColor}=props;const[timeData,setTimeData]=useState({time:\"\",date:\"\",hasParameter:false});useEffect(()=>{if(typeof window!==\"undefined\"){let value=null;// First, check localStorage\nconst localStorageValue=localStorage.getItem(parameterName);if(localStorageValue){value=localStorageValue;}else{// If not in localStorage, check URL query parameters\nconst searchParams=new URLSearchParams(window.location.search);value=searchParams.get(parameterName);}if(value){const time=new Date(value).toLocaleTimeString(\"en\",{hour:\"numeric\",minute:\"numeric\",timeZoneName:\"shortGeneric\",hour12:true});const date=new Date(value).toLocaleDateString(\"en-US\",{weekday:\"long\",year:\"numeric\",month:\"long\",day:\"numeric\"});startTransition(()=>{setTimeData({time,date,hasParameter:true});});}else{startTransition(()=>{setTimeData({time:\"\",date:\"\",hasParameter:false});});}}},[parameterName]);const isFixedWidth=props?.style&&props.style.width===\"100%\";return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,position:\"relative\",...isFixedWidth?{...props?.style}:{minWidth:\"max-content\"},color:textColor,display:\"flex\",flexDirection:\"column\",gap:0},children:[/*#__PURE__*/_jsx(\"p\",{style:{margin:0,...prefixFont},children:prefixText}),timeData.hasParameter?/*#__PURE__*/_jsxs(\"p\",{style:{margin:0,...dateTimeFont},children:[timeData.date,\" at \",timeData.time]}):/*#__PURE__*/_jsx(\"p\",{style:{margin:0,...dateTimeFont,opacity:.5},children:\"Check your emails to see the exact time of your booked call.\"})]});}addPropertyControls(EventTimeDisplay,{parameterName:{type:ControlType.String,title:\"URL Parameter Name\",defaultValue:\"event_start_time\",placeholder:\"event_start_time\"},prefixText:{type:ControlType.String,title:\"Prefix Text\",defaultValue:\"Your Call Is On:\",placeholder:\"Your Call Is On:\"},prefixFont:{type:ControlType.Font,title:\"Prefix Font\",defaultValue:{fontSize:\"20px\",variant:\"Regular\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},dateTimeFont:{type:ControlType.Font,title:\"Date Time Font\",defaultValue:{fontSize:\"20px\",variant:\"Bold\",letterSpacing:\"-0.01em\",lineHeight:\"1.2em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EventTimeDisplay\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EventTimeDisplay.map"],"mappings":"6MAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,gBAAc,aAAW,eAAa,aAAW,aAAW,EAAW,CAAC,EAAS,GAAaA,EAAS,CAAC,KAAK,GAAG,KAAK,GAAG,aAAa,GAAM,CAAC,CAAC,MAAc,CAAC,GAAU,IAAS,OAAY,CAAC,IAAI,EAAM,KAEzJ,GAD1C,AACG,EADvC,aAAa,QAAQ,EAAc,EACxC,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAoB,IAAI,EAAc,CAAK,EAAM,CAAC,IAAM,EAAK,IAAI,KAAK,EAAM,CAAC,mBAAmB,KAAK,CAAC,KAAK,UAAU,OAAO,UAAU,aAAa,eAAe,OAAO,GAAK,CAAC,CAAO,EAAK,IAAI,KAAK,EAAM,CAAC,mBAAmB,QAAQ,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