{"version":3,"file":"Modal.DP5eZgfS.mjs","names":["useState","useEffect","_jsxs","_Fragment","_jsx","__esmMin","_e","init_jsx_runtime","l","c","p","init_npm_react_18_3_1","ce","EliteModals","callOpen","setCallOpen","downloadOpen","setDownloadOpen","dlEmail","setDlEmail","dlStatus","setDlStatus","callTrigger","downloadTrigger","syncCallModal","syncDownloadModal","callObserver","downloadObserver","closeCallModal","closeDownloadModal","handleDownloadSubmit","email","payload","SHEET_ENDPOINT","s","init_Modal"],"sources":["https:/framerusercontent.com/modules/YUwy80t3HT8d4wBTJWV7/T7STiNTab5RTIMVQ5lZE/Modal.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const SHEET_ENDPOINT=\"https://script.google.com/macros/s/AKfycbwa1ONvu-C7jTpVzyA-wnICB_F06i7gzc7ZF1SE5OZW6nS-4RgoT0ju9z_2SyrTvTUJ/exec\";export default function EliteModals(){const[callOpen,setCallOpen]=useState(false);const[downloadOpen,setDownloadOpen]=useState(false);const[dlEmail,setDlEmail]=useState(\"\");const[dlStatus,setDlStatus]=useState(\"idle\");useEffect(()=>{const callTrigger=document.getElementById(\"eliteCallModal\");const downloadTrigger=document.getElementById(\"eliteDownloadModal\");const syncCallModal=()=>{setCallOpen(callTrigger?.classList.contains(\"show\")||false);};const syncDownloadModal=()=>{setDownloadOpen(downloadTrigger?.classList.contains(\"show\")||false);};const callObserver=callTrigger?new MutationObserver(syncCallModal):null;const downloadObserver=downloadTrigger?new MutationObserver(syncDownloadModal):null;if(callTrigger){callObserver?.observe(callTrigger,{attributes:true,attributeFilter:[\"class\"]});}if(downloadTrigger){downloadObserver?.observe(downloadTrigger,{attributes:true,attributeFilter:[\"class\"]});}syncCallModal();syncDownloadModal();return()=>{callObserver?.disconnect();downloadObserver?.disconnect();};},[]);function closeCallModal(){document.getElementById(\"eliteCallModal\")?.classList.remove(\"show\");setCallOpen(false);}function closeDownloadModal(){document.getElementById(\"eliteDownloadModal\")?.classList.remove(\"show\");setDownloadOpen(false);setDlStatus(\"idle\");}async function handleDownloadSubmit(e){e.preventDefault();const email=dlEmail.trim().toLowerCase();if(!email||!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)){setDlStatus(\"error\");return;}setDlStatus(\"loading\");try{const payload=new URLSearchParams;payload.append(\"type\",\"brochure\");payload.append(\"email\",email);await fetch(SHEET_ENDPOINT,{method:\"POST\",mode:\"no-cors\",body:payload});setDlStatus(\"success\");setDlEmail(\"\");}catch(error){setDlStatus(\"error\");}}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{id:\"eliteCallModal\",style:{display:\"none\"}}),/*#__PURE__*/_jsx(\"div\",{id:\"eliteDownloadModal\",style:{display:\"none\"}}),callOpen&&/*#__PURE__*/_jsx(\"div\",{style:s.overlay,onClick:closeCallModal,children:/*#__PURE__*/_jsxs(\"div\",{style:s.modal,onClick:e=>e.stopPropagation(),children:[/*#__PURE__*/_jsx(\"button\",{style:s.closeBtn,onClick:closeCallModal,children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"div\",{style:s.iconBubble,children:\"📅\"}),/*#__PURE__*/_jsx(\"h2\",{style:s.title,children:\"Book a discovery call\"}),/*#__PURE__*/_jsx(\"p\",{style:s.body,children:\"Choose the consultation that best matches your current stage and we’ll guide you from there.\"}),/*#__PURE__*/_jsxs(\"div\",{style:s.callOptions,children:[/*#__PURE__*/_jsx(\"a\",{href:\"https://calendly.com/kryptrtech\",target:\"_blank\",rel:\"noopener noreferrer\",style:s.callBtn,children:\"Book a GTP consultation\"}),/*#__PURE__*/_jsx(\"a\",{href:\"https://calendly.com/kryptrtech\",target:\"_blank\",rel:\"noopener noreferrer\",style:s.callBtn,children:\"Start the MTP conversation\"}),/*#__PURE__*/_jsx(\"a\",{href:\"https://calendly.com/kryptrtech\",target:\"_blank\",rel:\"noopener noreferrer\",style:s.callBtn,children:\"Book an onboarding consultation\"})]})]})}),downloadOpen&&/*#__PURE__*/_jsx(\"div\",{style:s.overlay,onClick:closeDownloadModal,children:/*#__PURE__*/_jsxs(\"div\",{style:s.modal,onClick:e=>e.stopPropagation(),children:[/*#__PURE__*/_jsx(\"button\",{style:s.closeBtn,onClick:closeDownloadModal,children:\"\\xd7\"}),/*#__PURE__*/_jsx(\"div\",{style:s.iconBubble,children:\"📄\"}),/*#__PURE__*/_jsx(\"h2\",{style:s.title,children:\"Download the brochure\"}),/*#__PURE__*/_jsx(\"p\",{style:s.body,children:\"Enter your work email and we’ll send the Kryptr brochure straight to your inbox.\"}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleDownloadSubmit,style:s.form,children:[/*#__PURE__*/_jsx(\"input\",{type:\"email\",value:dlEmail,onChange:e=>{setDlEmail(e.target.value);setDlStatus(\"idle\");},placeholder:\"Enter your work email\",required:true,style:s.input}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:dlStatus===\"loading\",style:{...s.submitBtn,opacity:dlStatus===\"loading\"?.7:1,cursor:dlStatus===\"loading\"?\"not-allowed\":\"pointer\"},children:dlStatus===\"loading\"?\"Sending...\":\"Send brochure\"})]}),dlStatus===\"success\"&&/*#__PURE__*/_jsx(\"p\",{style:s.successText,children:\"Brochure request received. Check your inbox shortly.\"}),dlStatus===\"error\"&&/*#__PURE__*/_jsx(\"p\",{style:s.errorText,children:\"Please enter a valid email and try again.\"})]})})]});}const s={overlay:{position:\"fixed\",inset:0,zIndex:999999,background:\"rgba(10, 10, 15, 0.72)\",backdropFilter:\"blur(8px)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:\"20px\",boxSizing:\"border-box\",fontFamily:\"'Plus Jakarta Sans', sans-serif\"},modal:{position:\"relative\",width:\"100%\",maxWidth:\"480px\",background:\"#FFFFFF\",borderRadius:\"24px\",padding:\"36px\",boxShadow:\"0 24px 80px rgba(0,0,0,0.3)\",boxSizing:\"border-box\",textAlign:\"center\"},closeBtn:{position:\"absolute\",top:\"16px\",right:\"18px\",width:\"32px\",height:\"32px\",borderRadius:\"999px\",border:\"none\",background:\"#F1F1F6\",color:\"#22223A\",fontSize:\"22px\",lineHeight:\"28px\",cursor:\"pointer\"},iconBubble:{width:\"56px\",height:\"56px\",borderRadius:\"50%\",background:\"#EEEDFE\",color:\"#534AB7\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",fontSize:\"26px\",margin:\"0 auto 18px\"},title:{fontSize:\"26px\",lineHeight:1.2,margin:\"0 0 12px\",color:\"#22223A\",fontWeight:800,letterSpacing:\"-0.02em\"},body:{fontSize:\"15px\",lineHeight:1.7,color:\"#55556A\",margin:\"0 0 24px\"},callOptions:{display:\"flex\",flexDirection:\"column\",gap:\"12px\"},callBtn:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\",padding:\"15px 18px\",borderRadius:\"12px\",background:\"#534AB7\",color:\"#FFFFFF\",textDecoration:\"none\",fontSize:\"15px\",fontWeight:700,boxSizing:\"border-box\"},form:{display:\"flex\",flexDirection:\"column\",gap:\"12px\"},input:{width:\"100%\",height:\"52px\",borderRadius:\"12px\",border:\"1px solid #DADAE8\",padding:\"0 16px\",fontSize:\"15px\",color:\"#22223A\",outline:\"none\",boxSizing:\"border-box\",fontFamily:\"'Plus Jakarta Sans', sans-serif\"},submitBtn:{width:\"100%\",height:\"52px\",borderRadius:\"12px\",border:\"none\",background:\"#534AB7\",color:\"#FFFFFF\",fontSize:\"15px\",fontWeight:700,fontFamily:\"'Plus Jakarta Sans', sans-serif\"},successText:{margin:\"14px 0 0\",fontSize:\"13px\",lineHeight:1.5,color:\"#087443\",fontWeight:600},errorText:{margin:\"14px 0 0\",fontSize:\"13px\",lineHeight:1.5,color:\"#C2410C\",fontWeight:600}};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EliteModals\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}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