{"version":3,"file":"toggleScrollAndFocusForOverlay.BcE2euCD.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/aM0l2bOZXtDLwnO70hxe/a2Tr0iRDaOhnwnof77IS/BreakoutFormKrishna.js","https:/framerusercontent.com/modules/zISSQBpOYMta5UgAiBpS/UE4msJbHmDnMfwvcnnZd/toggleScrollAndFocusForOverlay.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState,useEffect,useRef}from\"react\";const baseStyles={form:{margin:\"0\",position:\"relative\",display:\"flex\",gap:\"8px\",background:\"white\",padding:\"8px\",borderRadius:\"16px\",border:\"1px solid rgb(96, 60, 241)\",boxShadow:\"rgb(255, 255, 255) 0px 0px 2px 0px inset, rgba(0, 0, 0, 0.05) 0px 8px 12px 0px\"},input:{flex:1,padding:\"12px\",border:\"none\",borderRadius:\"10px\",fontSize:\"15px\",outline:\"none\",fontFamily:'\"Inter\", sans-serif',fontWeight:500,letterSpacing:\"-0.03em\",minWidth:\"350px\"},svg:{width:\"15px\",height:\"15px\",fill:\"none\"}};export function BreakoutForm({placeholder=\"Still not convinced? Shoot a question\",cta=\"Show me how\",hoverBackground,hoverColor}){const[hover,setHover]=useState(false);const[isMobile,setIsMobile]=useState(false);const formRef=useRef(null);useEffect(()=>{const handleResize=()=>setIsMobile(window.innerWidth<640);handleResize();window.addEventListener(\"resize\",handleResize);return()=>window.removeEventListener(\"resize\",handleResize);},[]);const handleMobileSubmit=()=>{if(formRef.current){formRef.current.requestSubmit()// triggers native form submission\n;}};const handleFormSubmit=e=>{e.preventDefault();// if (!formRef.current) return\n// const input = formRef.current.querySelector(\n//     'input[type=\"text\"]'\n// ) as HTMLInputElement\n// const message = input.value.trim()\n// window?.dataLayer?.push({\n//     event: \"AGENT_OPEN\",\n//     ctaName: cta,\n//     message: message,\n// })\n};const buttonStyle={padding:\"12px 16px\",backgroundColor:hover?hoverBackground||\"rgb(96, 60, 241)\":\"rgb(96, 60, 241)\",color:hover?hoverColor||\"white\":\"white\",border:\"none\",borderRadius:\"10px\",cursor:\"pointer\",fontWeight:600,fontFamily:'\"Manrope\", sans-serif',fontSize:\"14px\",display:\"flex\",alignItems:\"center\",gap:\"4px\",justifyContent:\"center\",transition:\"all 0.2s ease\",width:isMobile?\"100%\":\"auto\"};const formStyle={...baseStyles.form,flexDirection:\"row\",alignItems:\"center\",padding:isMobile?\"0px\":baseStyles.form.padding,borderRadius:isMobile?\"8px\":baseStyles.form.borderRadius};const inputStyle={...baseStyles.input,minWidth:isMobile?\"100%\":\"350px\",width:\"100%\",borderRadius:isMobile?\"8px\":baseStyles.input.borderRadius};return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"stretch\",gap:isMobile?\"12px\":\"0px\"},children:[/*#__PURE__*/_jsxs(\"form\",{\"data-breakout-form\":true,ref:formRef,className:\"breakout-form\",style:formStyle,children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:placeholder,required:true,style:inputStyle}),!isMobile&&/*#__PURE__*/_jsxs(\"button\",{type:\"submit\",style:buttonStyle,onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),children:[/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 15 15\",style:baseStyles.svg,children:/*#__PURE__*/_jsx(\"path\",{xmlns:\"http://www.w3.org/2000/svg\",d:\"M6.71924 6.50041H3.07129M2.33829 1.34705L11.5643 5.82025C12.1324 6.09572 12.1324 6.90511 11.5643 7.18058L2.33829 11.6538C1.70625 11.9602 1.03445 11.3142 1.31599 10.6706L3.00791 6.80339C3.09242 6.61024 3.09241 6.39058 3.00791 6.19743L1.31599 2.33019C1.03445 1.68667 1.70625 1.04061 2.33829 1.34705Z\",stroke:\"white\",strokeWidth:\"1.16667\",strokeLinecap:\"round\"})}),cta]})]}),isMobile&&/*#__PURE__*/_jsxs(\"button\",{type:\"button\",onClick:handleMobileSubmit,style:buttonStyle,onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),children:[/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 15 15\",style:baseStyles.svg,children:/*#__PURE__*/_jsx(\"path\",{xmlns:\"http://www.w3.org/2000/svg\",d:\"M6.71924 6.50041H3.07129M2.33829 1.34705L11.5643 5.82025C12.1324 6.09572 12.1324 6.90511 11.5643 7.18058L2.33829 11.6538C1.70625 11.9602 1.03445 11.3142 1.31599 10.6706L3.00791 6.80339C3.09242 6.61024 3.09241 6.39058 3.00791 6.19743L1.31599 2.33019C1.03445 1.68667 1.70625 1.04061 2.33829 1.34705Z\",stroke:\"white\",strokeWidth:\"1.16667\",strokeLinecap:\"round\"})}),cta]})]});}BreakoutForm.displayName=\"Breakout Form\";addPropertyControls(BreakoutForm,{placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Still not convinced? Shoot a question\"},cta:{type:ControlType.String,title:\"Button Text\",defaultValue:\"Show me how\"},hoverBackground:{type:ControlType.Color,title:\"Hover Background\",defaultValue:\"rgb(80, 45, 220)\"},hoverColor:{type:ControlType.Color,title:\"Hover Text Color\",defaultValue:\"white\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"BreakoutForm\":{\"type\":\"reactComponent\",\"name\":\"BreakoutForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BreakoutFormKrishna.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function toggleScrollForChatOverlay(Component){return props=>{useEffect(()=>{const overlay=document.getElementById(\"chat-widget-overlay\");const disableScroll=()=>{document.body.style.overflow=\"hidden\";};const enableScroll=()=>{document.body.style.overflow=\"\";};const checkOverlayVisibility=()=>{if(overlay&&getComputedStyle(overlay).display!==\"none\"){disableScroll();}else{enableScroll();}};// Set up a MutationObserver to monitor changes in overlay visibility\nconst observer=new MutationObserver(()=>{checkOverlayVisibility();});if(overlay){observer.observe(overlay,{attributes:true,attributeFilter:[\"style\",\"class\"]});// Initial check in case it's already open\ncheckOverlayVisibility();}return()=>{enableScroll()// Ensure scroll is enabled when unmounting\n;observer.disconnect();};},[]);return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"toggleScrollForChatOverlay\":{\"type\":\"reactHoc\",\"name\":\"toggleScrollForChatOverlay\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./toggleScrollAndFocusForOverlay.map"],"mappings":"8MAAqoB,SAAgB,EAAa,CAAC,cAAY,wCAAwC,MAAI,cAAc,kBAAgB,cAAY,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,GAAM,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAO,EAAQC,EAAO,KAAK,CAAC,MAAc,CAAC,IAAM,MAAiB,EAAY,EAAO,WAAW,IAAI,CAA+D,OAA9D,GAAc,CAAC,EAAO,iBAAiB,SAAS,EAAa,KAAW,EAAO,oBAAoB,SAAS,EAAa,EAAG,EAAE,CAAC,CAAC,IAAM,MAAuB,CAAI,EAAQ,SAAS,EAAQ,QAAQ,eAAe,EAWroC,EAAY,CAAC,QAAQ,YAAY,gBAAgB,GAAM,GAAoC,mBAAmB,MAAM,GAAM,GAAoB,QAAQ,OAAO,OAAO,aAAa,OAAO,OAAO,UAAU,WAAW,IAAI,WAAW,wBAAwB,SAAS,OAAO,QAAQ,OAAO,WAAW,SAAS,IAAI,MAAM,eAAe,SAAS,WAAW,gBAAgB,MAAM,EAAS,OAAO,OAAO,CAAO,EAAU,CAAC,GAAG,EAAW,KAAK,cAAc,MAAM,WAAW,SAAS,QAAQ,EAAS,MAAM,EAAW,KAAK,QAAQ,aAAa,EAAS,MAAM,EAAW,KAAK,aAAa,CAAO,EAAW,CAAC,GAAG,EAAW,MAAM,SAAS,EAAS,OAAO,QAAQ,MAAM,OAAO,aAAa,EAA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