{"version":3,"file":"RequestInviteForm.fpAnPF95.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/lpcJM0s9P40ce7luSOCK/eWv2TQt8nqsiMpv4gKfo/RequestInviteForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";// ─── Spinner ─────────────────────────────────────────────────────────────────\nconst Spinner=()=>/*#__PURE__*/_jsx(motion.div,{animate:{rotate:360},transition:{duration:.7,repeat:Infinity,ease:\"linear\"},style:{width:20,height:20,borderRadius:\"50%\",border:\"4px solid #fb923c\",borderTop:\"4px solid #9a3412\"}});// ─── Styles ──────────────────────────────────────────────────────────────────\nconst styles=`\n    .form-wrapper {\n        position: relative;\n        width: 100%;\n    }\n\n    .input-group {\n        display: flex;\n        flex-direction: row;\n        align-items: center;\n        gap: 8px;\n    }\n\n    .input-field {\n        flex-grow: 1;\n        min-width: 280px;\n        padding: 14px 24px;\n        font-size: 20px;\n        font-family: 'Be Vietnam Pro', sans-serif;\n        color: #0c0a09;\n        background: #ffffff;\n        border: 1px solid #d6d3d1;\n        border-radius: 50px;\n        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);\n    }\n\n    .submit-button {\n        min-width: 210px;\n        height: 56px;\n        padding: 16px 20px;\n        font-size: 20px;\n        font-family: 'Be Vietnam Pro', sans-serif;\n        font-weight: bold;\n        line-height: 1;\n        white-space: nowrap;\n        color: #ffffff;\n        background-color: #ea580c;\n        border: 1px solid #c2410c;\n        border-radius: 50px;\n        cursor: pointer;\n        transition: all 150ms cubic-bezier(0.42, 0, 0.58, 1);\n        box-shadow:\n            rgba(0, 0, 0, 0.18) 0px 0.6px 1.56px -1.25px,\n            rgba(0, 0, 0, 0.16) 0px 2.29px 5.95px -2.5px,\n            rgba(0, 0, 0, 0.063) 0px 10px 26px -3.75px;\n    }\n\n    .submit-button:hover {\n        background-color: #c2410c;\n    }\n\n    .submit-button:disabled {\n        cursor: not-allowed;\n        opacity: 0.8;\n    }\n\n    @media (max-width: 640px) {\n        .input-group {\n            flex-direction: column;\n            align-items: stretch;\n        }\n\n        .submit-button {\n            width: 100%;\n        }\n    }\n`;// ─── Component ───────────────────────────────────────────────────────────────\nexport default function RequestAccessForm(props){const{ctaText,redirectUrl}=props;const[currentPageUrl,setCurrentPageUrl]=useState(\"\");const[isLoading,setIsLoading]=useState(false);useEffect(()=>{setCurrentPageUrl(window.location.href);},[]);const handleSubmit=async event=>{event.preventDefault();setIsLoading(true);const formData=new FormData(event.currentTarget);const jsonData=Object.fromEntries(formData.entries());try{await fetch(\"https://submit-form.com/mzBXg9Vbh\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\",Accept:\"application/json\"},body:JSON.stringify(jsonData)});window.location.href=redirectUrl;}catch(error){console.error(\"Error submitting form:\",error);alert(\"Hm... that didn't work. Please try one more time.\");}finally{setIsLoading(false);}};return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:styles}),/*#__PURE__*/_jsx(\"form\",{onSubmit:handleSubmit,className:\"form-wrapper\",children:/*#__PURE__*/_jsxs(\"div\",{className:\"input-group\",children:[/*#__PURE__*/_jsx(\"input\",{type:\"email\",name:\"email\",placeholder:\"Your work email\",className:\"input-field\",required:true}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"pageUrl\",value:currentPageUrl}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",className:\"submit-button\",disabled:isLoading,children:isLoading?/*#__PURE__*/_jsx(Spinner,{}):ctaText})]})})]});}// ─── Property Controls ───────────────────────────────────────────────────────\naddPropertyControls(RequestAccessForm,{ctaText:{type:ControlType.String,title:\"CTA Text\",defaultValue:\"Submit\",description:\"Text displayed on the submit button\"},redirectUrl:{type:ControlType.String,title:\"Redirect URL\",defaultValue:\"https://folio.co/onboard\",description:\"Where to send the user after successful submission\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RequestAccessForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RequestInviteForm.map"],"mappings":"8PAqEA,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,UAAQ,eAAa,EAAW,CAAC,EAAe,GAAmBA,EAAS,GAAG,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAilB,OAAhlB,MAAc,CAAC,EAAkB,EAAO,SAAS,KAAK,EAAG,EAAE,CAAC,CAAwiB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS,EAAO,CAAC,CAAc,EAAK,OAAO,CAAC,SAAtnB,KAAM,IAAO,CAAC,EAAM,gBAAgB,CAAC,EAAa,GAAK,CAAC,IAAM,EAAS,IAAI,SAAS,EAAM,cAAc,CAAO,EAAS,OAAO,YAAY,EAAS,SAAS,CAAC,CAAC,GAAG,CAAC,MAAM,MAAM,oCAAoC,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,OAAO,mBAAmB,CAAC,KAAK,KAAK,UAAU,EAAS,CAAC,CAAC,CAAC,EAAO,SAAS,KAAK,QAAmB,EAAM,CAAC,QAAQ,MAAM,yBAAyB,EAAM,CAAC,MAAM,oDAAoD,QAAS,CAAC,EAAa,GAAM,GAAgJ,UAAU,eAAe,SAAsB,EAAM,MAAM,CAAC,UAAU,cAAc,SAAS,CAAc,EAAK,QAAQ,CAAC,KAAK,QAAQ,KAAK,QAAQ,YAAY,kBAAkB,UAAU,cAAc,SAAS,GAAK,CAAC,CAAc,EAAK,QAAQ,CAAC,KAAK,SAAS,KAAK,UAAU,MAAM,EAAe,CAAC,CAAc,EAAK,SAAS,CAAC,KAAK,SAAS,UAAU,gBAAgB,SAAS,EAAU,SAAS,EAAuB,EAAK,EAAQ,EAAE,CAAC,CAAC,EAAQ,CA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