{"version":3,"file":"Email_verification.BAcYC89U.mjs","names":[],"sources":["https:/framerusercontent.com/modules/URbHwDewkIR5snwGkaVT/pcz16FLk9gP3DDRrF4sc/Email_verification.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef}from\"react\";import{createStore}from\"https://framer.com/m/framer/store.js@^1.0.0\";function isValidEmail(email){return/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email);}const useStore=createStore({email:\"\",checked:false,showOverlay:false});export function withEmailInput(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,value:store.email,onChange:value=>setStore({email:value})});});}export function withRequiredCheckbox(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,checked:store.checked,onChange:value=>setStore({checked:value})});});}export function withSubmitButton(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();const canSubmit=isValidEmail(store.email)&&store.checked;return /*#__PURE__*/_jsx(Component,{ref:ref,...props,disabled:!canSubmit,onClick:()=>{if(!canSubmit)return;setStore({showOverlay:true});}});});}export function withOverlayToggle(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[store,setStore]=useStore();return /*#__PURE__*/_jsx(Component,{ref:ref,...props,visible:store.showOverlay,onTap:()=>setStore({showOverlay:false})});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withEmailInput\":{\"type\":\"reactHoc\",\"name\":\"withEmailInput\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withSubmitButton\":{\"type\":\"reactHoc\",\"name\":\"withSubmitButton\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withRequiredCheckbox\":{\"type\":\"reactHoc\",\"name\":\"withRequiredCheckbox\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withOverlayToggle\":{\"type\":\"reactHoc\",\"name\":\"withOverlayToggle\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Email_verification.map"],"mappings":"0KAA+gB,SAAgB,EAAqB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAM,GAAU,GAAU,CAAC,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,EAAM,QAAQ,SAAS,GAAO,EAAS,CAAC,QAAQ,EAAM,CAAC,CAAC,CAAC,EAAG,CAAqU,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAM,GAAU,GAAU,CAAC,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAM,QAAQ,EAAM,YAAY,UAAU,EAAS,CAAC,YAAY,GAAM,CAAC,CAAC,CAAC,EAAG,oBAAtxC,IAA8B,IAAqE,CAAmF,EAAS,EAAY,CAAC,MAAM,GAAG,QAAQ,GAAM,YAAY,GAAM,CAAC"}