{"version":3,"file":"StartOrderModal.PRaHzRFI.mjs","names":["React.useState","React.useRef","React.useCallback","_Fragment"],"sources":["https:/framerusercontent.com/modules/o81C6Spt50fu4dJCX1Qk/atrLozX2fnuJmn2mZTUq/StartOrderModal.js"],"sourcesContent":["// import * as React from \"react\"\n// export default function StartOrderModal() {\n//     const [open, setOpen] = React.useState(false)\n//     const [iframeLoaded, setIframeLoaded] = React.useState(false)\n//     React.useEffect(() => {\n//         const openModal = () => {\n//             setIframeLoaded(false)\n//             setOpen(true)\n//         }\n//         const onKeyDown = (e: KeyboardEvent) => {\n//             if (e.key === \"Escape\") setOpen(false)\n//         }\n//         window.addEventListener(\"open-start-order\", openModal as EventListener)\n//         document.addEventListener(\"keydown\", onKeyDown)\n//         if (open) {\n//             document.body.style.overflow = \"hidden\"\n//         } else {\n//             document.body.style.overflow = \"\"\n//         }\n//         return () => {\n//             window.removeEventListener(\n//                 \"open-start-order\",\n//                 openModal as EventListener\n//             )\n//             document.removeEventListener(\"keydown\", onKeyDown)\n//             document.body.style.overflow = \"\"\n//         }\n//     }, [open])\n//     if (!open) return null\n//     return (\n//         <div style={overlayStyle} onClick={() => setOpen(false)}>\n//             <div style={modalStyle} onClick={(e) => e.stopPropagation()}>\n//                 <div style={headerStyle}>\n//                     <div style={headerTextWrapStyle}>\n//                         <h2 style={titleStyle}>Start your order</h2>\n//                         <p style={subtitleStyle}>Secure checkout.</p>\n//                     </div>\n//                     <button\n//                         style={closeButtonStyle}\n//                         onClick={() => setOpen(false)}\n//                         aria-label=\"Close modal\"\n//                     >\n//                         ×\n//                     </button>\n//                 </div>\n//                 <div style={contentStyle}>\n//                     {!iframeLoaded && (\n//                         <div style={loadingOverlayStyle}>\n//                             <div style={spinnerStyle} />\n//                             <p style={loadingTextStyle}>\n//                                 Preparing your order…\n//                             </p>\n//                         </div>\n//                     )}\n//                     <iframe\n//                         title=\"CleanCloud Order\"\n//                         src=\"https://cleancloudapp.com/s3/41557\"\n//                         style={{\n//                             ...iframeStyle,\n//                             opacity: iframeLoaded ? 1 : 0,\n//                         }}\n//                         onLoad={() => setIframeLoaded(true)}\n//                     />\n//                 </div>\n//             </div>\n//         </div>\n//     )\n// }\n// const overlayStyle: React.CSSProperties = {\n//     position: \"fixed\",\n//     inset: 0,\n//     background: \"rgba(0, 0, 0, 0.45)\",\n//     display: \"flex\",\n//     alignItems: \"center\",\n//     justifyContent: \"center\",\n//     zIndex: 9999,\n//     padding: 12,\n//     backdropFilter: \"blur(6px)\",\n// }\n// const modalStyle: React.CSSProperties = {\n//     position: \"relative\",\n//     width: \"min(1100px, 100%)\",\n//     height: \"min(860px, 100dvh - 24px)\",\n//     maxHeight: \"calc(100dvh - 24px)\",\n//     background: \"#ffffff\",\n//     borderRadius: 20,\n//     overflow: \"hidden\",\n//     boxShadow: \"0 20px 60px rgba(0,0,0,0.25)\",\n//     display: \"flex\",\n//     flexDirection: \"column\",\n// }\n// const headerStyle: React.CSSProperties = {\n//     display: \"flex\",\n//     alignItems: \"center\",\n//     justifyContent: \"space-between\",\n//     gap: 12,\n//     padding: \"16px 28px 10px 28px\",\n//     borderBottom: \"1px solid rgba(0,0,0,0.06)\",\n//     flexShrink: 0,\n//     background: \"#ffffff\",\n// }\n// const headerTextWrapStyle: React.CSSProperties = {\n//     minWidth: 0,\n//     flex: 1,\n// }\n// const titleStyle: React.CSSProperties = {\n//     margin: 0,\n//     fontSize: \"clamp(20px, 2.3vw, 28px)\",\n//     lineHeight: 1.1,\n//     fontWeight: 600,\n//     color: \"#111111\",\n// }\n// const subtitleStyle: React.CSSProperties = {\n//     margin: \"6px 0 0 0\",\n//     fontSize: \"clamp(12px, 1.6vw, 13px)\",\n//     lineHeight: 1.4,\n//     color: \"rgba(17,17,17,0.6)\",\n// }\n// const closeButtonStyle: React.CSSProperties = {\n//     border: \"none\",\n//     background: \"rgba(0,0,0,0.06)\",\n//     color: \"#111111\",\n//     width: 40,\n//     height: 40,\n//     borderRadius: 999,\n//     cursor: \"pointer\",\n//     fontSize: 26,\n//     lineHeight: 1,\n//     display: \"flex\",\n//     alignItems: \"center\",\n//     justifyContent: \"center\",\n//     flexShrink: 0,\n// }\n// const contentStyle: React.CSSProperties = {\n//     position: \"relative\",\n//     flex: 1,\n//     minHeight: 0,\n//     background: \"#ffffff\",\n// }\n// const loadingOverlayStyle: React.CSSProperties = {\n//     position: \"absolute\",\n//     inset: 0,\n//     display: \"flex\",\n//     flexDirection: \"column\",\n//     alignItems: \"center\",\n//     justifyContent: \"center\",\n//     gap: 14,\n//     background: \"#ffffff\",\n//     zIndex: 2,\n//     padding: 24,\n// }\n// const spinnerStyle: React.CSSProperties = {\n//     width: 34,\n//     height: 34,\n//     borderRadius: \"50%\",\n//     border: \"3px solid rgba(0,0,0,0.12)\",\n//     borderTop: \"3px solid rgba(0,0,0,0.75)\",\n//     animation: \"spin 0.8s linear infinite\",\n// }\n// const loadingTextStyle: React.CSSProperties = {\n//     margin: 0,\n//     fontSize: 14,\n//     lineHeight: 1.4,\n//     color: \"rgba(17,17,17,0.7)\",\n//     textAlign: \"center\",\n// }\n// const iframeStyle: React.CSSProperties = {\n//     width: \"100%\",\n//     height: \"100%\",\n//     border: \"none\",\n//     display: \"block\",\n//     transition: \"opacity 0.25s ease\",\n//     background: \"#ffffff\",\n// }\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";export default function StartOrderModal(){const[open,setOpen]=React.useState(false);const[embedLoaded,setEmbedLoaded]=React.useState(false);const containerRef=React.useRef(null);React.useEffect(()=>{const openModal=()=>{setEmbedLoaded(false);setOpen(true);};const onKeyDown=e=>{if(e.key===\"Escape\")setOpen(false);};window.addEventListener(\"open-start-order\",openModal);document.addEventListener(\"keydown\",onKeyDown);return()=>{window.removeEventListener(\"open-start-order\",openModal);document.removeEventListener(\"keydown\",onKeyDown);document.documentElement.classList.remove(\"drova-modal-open\");document.body.classList.remove(\"drova-modal-open\");};},[]);React.useEffect(()=>{if(!open){document.documentElement.classList.remove(\"drova-modal-open\");document.body.classList.remove(\"drova-modal-open\");return;}document.documentElement.classList.add(\"drova-modal-open\");document.body.classList.add(\"drova-modal-open\");let cancelled=false;const initStore=()=>{if(cancelled||!open||!window.CleanCloudWebApp||!containerRef.current){return;}containerRef.current.innerHTML=\"\";window.CleanCloudWebApp(\"#myStoreContainer\",41557,{width:\"auto\",height:\"100%\",welcomeMessage:false,theme:{border:{visible:false}}});setTimeout(()=>{if(!cancelled)setEmbedLoaded(true);},250);};const existingCss=document.querySelector('link[data-cleancloud=\"true\"]');if(!existingCss){const link=document.createElement(\"link\");link.rel=\"stylesheet\";link.href=\"https://cleancloudapp.com/webapp/public/webapp/cleancloud.css\";link.setAttribute(\"data-cleancloud\",\"true\");document.head.appendChild(link);}const existingScript=document.querySelector('script[data-cleancloud=\"true\"]');if(existingScript){if(window.CleanCloudWebApp){initStore();}else{existingScript.addEventListener(\"load\",initStore,{once:true});}return()=>{cancelled=true;document.documentElement.classList.remove(\"drova-modal-open\");document.body.classList.remove(\"drova-modal-open\");};}const script=document.createElement(\"script\");script.src=\"https://cleancloudapp.com/webapp/public/webapp/cleancloud.js\";script.async=true;script.setAttribute(\"data-cleancloud\",\"true\");script.addEventListener(\"load\",initStore,{once:true});document.body.appendChild(script);return()=>{cancelled=true;document.documentElement.classList.remove(\"drova-modal-open\");document.body.classList.remove(\"drova-modal-open\");};},[open]);const preventOverlayScroll=React.useCallback(e=>{e.preventDefault();},[]);const preventOverlayTouch=React.useCallback(e=>{e.preventDefault();},[]);const allowModalScroll=React.useCallback(e=>{e.stopPropagation();},[]);const allowModalTouch=React.useCallback(e=>{e.stopPropagation();},[]);if(!open)return null;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                html.drova-modal-open,\n                body.drova-modal-open {\n                    overflow: hidden !important;\n                    overscroll-behavior: none !important;\n                    height: 100%;\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{style:overlayStyle,onClick:()=>setOpen(false),onWheel:preventOverlayScroll,onTouchMove:preventOverlayTouch,children:/*#__PURE__*/_jsxs(\"div\",{id:\"drova-start-order-modal\",style:modalStyle,onClick:e=>e.stopPropagation(),children:[/*#__PURE__*/_jsxs(\"div\",{style:headerStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:headerTextWrapStyle,children:[/*#__PURE__*/_jsx(\"h2\",{style:titleStyle,children:\"Start your order\"}),/*#__PURE__*/_jsx(\"p\",{style:subtitleStyle,children:\"Secure checkout.\"})]}),/*#__PURE__*/_jsx(\"button\",{style:closeButtonStyle,onClick:()=>setOpen(false),\"aria-label\":\"Close modal\",children:\"\\xd7\"})]}),/*#__PURE__*/_jsxs(\"div\",{id:\"drova-start-order-content\",style:contentStyle,onWheel:allowModalScroll,onTouchMove:allowModalTouch,children:[!embedLoaded&&/*#__PURE__*/_jsxs(\"div\",{style:loadingOverlayStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:spinnerStyle}),/*#__PURE__*/_jsx(\"p\",{style:loadingTextStyle,children:\"Preparing your order…\"})]}),/*#__PURE__*/_jsx(\"div\",{id:\"myStoreContainer\",ref:containerRef,style:{...embedStyle,opacity:embedLoaded?1:0}})]})]})})]});}const overlayStyle={position:\"fixed\",inset:0,background:\"rgba(0, 0, 0, 0.45)\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:9999,padding:12,backdropFilter:\"blur(6px)\"};const modalStyle={position:\"relative\",width:\"min(1100px, 100%)\",height:\"min(860px, calc(100dvh - 24px))\",maxHeight:\"calc(100dvh - 24px)\",background:\"#ffffff\",borderRadius:20,overflow:\"hidden\",boxShadow:\"0 20px 60px rgba(0,0,0,0.25)\",display:\"flex\",flexDirection:\"column\"};const headerStyle={display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",gap:12,padding:\"16px 28px 10px 28px\",borderBottom:\"1px solid rgba(0,0,0,0.06)\",flexShrink:0,background:\"#ffffff\"};const headerTextWrapStyle={minWidth:0,flex:1};const titleStyle={margin:0,fontSize:\"clamp(20px, 2.3vw, 28px)\",lineHeight:1.1,fontWeight:600,color:\"#111111\"};const subtitleStyle={margin:\"6px 0 0 0\",fontSize:\"clamp(12px, 1.6vw, 13px)\",lineHeight:1.4,color:\"rgba(17,17,17,0.6)\"};const closeButtonStyle={border:\"none\",background:\"rgba(0,0,0,0.06)\",color:\"#111111\",width:40,height:40,borderRadius:999,cursor:\"pointer\",fontSize:26,lineHeight:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",flexShrink:0};const contentStyle={position:\"relative\",flex:1,minHeight:0,background:\"#ffffff\",overflowY:\"auto\",overflowX:\"hidden\",WebkitOverflowScrolling:\"touch\",overscrollBehavior:\"contain\"};const loadingOverlayStyle={position:\"absolute\",inset:0,display:\"flex\",flexDirection:\"column\",alignItems:\"center\",justifyContent:\"center\",gap:14,background:\"#ffffff\",zIndex:2,padding:24};const spinnerStyle={width:34,height:34,borderRadius:\"50%\",border:\"3px solid rgba(0,0,0,0.12)\",borderTop:\"3px solid rgba(0,0,0,0.75)\",animation:\"spin 0.8s linear infinite\"};const loadingTextStyle={margin:0,fontSize:14,lineHeight:1.4,color:\"rgba(17,17,17,0.7)\",textAlign:\"center\"};const embedStyle={width:\"100%\",height:\"100%\",transition:\"opacity 0.25s ease\",background:\"#ffffff\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StartOrderModal\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StartOrderModal.map"],"mappings":"mKA8K2G,SAAwB,GAAiB,CAAC,GAAK,CAAC,EAAK,GAASA,EAAe,GAAM,CAAM,CAAC,EAAY,GAAgBA,EAAe,GAAM,CAAO,EAAaC,EAAa,KAAK,CAAC,MAAoB,CAAC,IAAM,MAAc,CAAC,EAAe,GAAM,CAAC,EAAQ,GAAK,EAAS,EAAU,GAAG,CAAI,EAAE,MAAM,UAAS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