{"version":3,"file":"Email_form.CGCeVJdt.mjs","names":["React","e"],"sources":["https:/framerusercontent.com/modules/dhTcBaNSQgLz51USzvqA/arLsiMECbnBjOWlA8X61/Email_form.js"],"sourcesContent":["\"use client\";import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import React from\"react\";import{useCurrentLocation}from\"https://framer.com/m/UseCurrentLocation-coQY.js\";import{addPropertyControls,ControlType}from\"framer\";// --------------------------------------------------- //\n// PROPERTY CONTROLS\n// --------------------------------------------------- //\naddPropertyControls(EmailForm,{font:{type:ControlType.Font,title:\"Font\",defaultFontType:\"sans-serif\",controls:\"extended\"},buttonComponent:{type:ControlType.ComponentInstance,description:\"Make sure the accesibility tag is set to 'div', because it's wrapped in <button type='submit'>\"},redirectTo:{type:ControlType.String,title:\"Redirect To\",defaultValue:\"/pricing\"},textColor:{type:ControlType.Color,title:\"Text Color\"},padding:{type:ControlType.Object,title:\"Padding\",controls:{top:{type:ControlType.Number,title:\"Top\",defaultValue:12,unit:\"px\"},right:{type:ControlType.Number,title:\"Right\",defaultValue:12,unit:\"px\"},bottom:{type:ControlType.Number,title:\"Bottom\",defaultValue:12,unit:\"px\"},left:{type:ControlType.Number,title:\"Left\",defaultValue:12,unit:\"px\"}}},placeholderText:{type:ControlType.String,title:\"Input Placeholder\",defaultValue:\"Enter your email\"},placeholderTextColor:{type:ControlType.Color,title:\"Placeholder Text Color\"},wrapperFrame:{type:ControlType.Object,title:\"Wrapper Frame\",controls:{backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#ffffff24\"},padding:{type:ControlType.Object,title:\"Padding\",controls:{top:{type:ControlType.Number,title:\"Top\",defaultValue:8,unit:\"px\"},right:{type:ControlType.Number,title:\"Right\",defaultValue:8,unit:\"px\"},bottom:{type:ControlType.Number,title:\"Bottom\",defaultValue:8,unit:\"px\"},left:{type:ControlType.Number,title:\"Left\",defaultValue:8,unit:\"px\"}}},border:{type:ControlType.Object,title:\"Border\",controls:{width:{type:ControlType.Number,title:\"Width\",defaultValue:1,unit:\"px\"},style:{type:ControlType.Enum,title:\"Style\",defaultValue:\"inset\",options:[\"inset\",\"solid\",\"dashed\",\"dotted\",\"double\"]},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ffffff18\"},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:10,unit:\"px\"}}}}},zapierWebhookUrl:{type:ControlType.String,title:\"Zapier Webhook URL\",defaultValue:\"https://hooks.zapier.com/hooks/catch/15912942/2elgw3p/\"}});// --------------------------------------------------- //\n// DEFAULT PROPS\n// --------------------------------------------------- //\nEmailForm.defaultProps={font:{fontFamily:\"sans-serif\",letterSpacing:\"0px\",fontSize:14},redirectTo:\"/pricing\",buttonComponent:undefined,placeholderText:\"Enter your email\",placeholderTextColor:\"#ffffff70\",padding:{top:0,right:8,bottom:0,left:8},textColor:\"#ffffff\",wrapperFrame:{backgroundColor:\"#ffffff24\",padding:{top:8,right:8,bottom:8,left:8},border:{width:1,style:\"inset\",color:\"#ffffff18\",radius:10}},zapierWebhookUrl:\"https://hooks.zapier.com/hooks/catch/15912942/2elgw3p\"};// --------------------------------------------------- //\n// MAIN COMPONENT\n// --------------------------------------------------- //\n/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerIntrinsicHeight 64\n * @framerIntrinsicWidth 420\n * @framerDisableUnlink\n */export default function EmailForm(props){// const setCurrentLocation = (redirectTo: string) => {\n//   console.log(redirectTo);\n// };\nconst[currentLocation,setCurrentLocation]=useCurrentLocation();const[email,setEmail]=React.useState(\"\");const formStyle={display:\"flex\",flexDirection:\"row\",alignItems:\"center\",justifyContent:\"flex-end\",gap:10,width:\"100%\",height:\"100%\",flexShrink:1,position:\"relative\"};const inputStyle={padding:`${props.padding.top}px ${props.padding.right}px ${props.padding.bottom}px ${props.padding.left}px`,backgroundColor:\"transparent\",border:\"none\",color:props.textColor,width:\"100%\",height:\"100%\",...props.font};// placeholder button style\nconst buttonStyle={padding:\"0px 20px\",height:\"48px\",width:\"fit-content\",fontSize:\"14px\",fontWeight:\"500\",backgroundColor:\"#242424\",color:\"white\",border:\"1px inset #ffffff18\",borderRadius:\"8px\",cursor:\"pointer\",transition:\"background-color 0.2s ease\",flexShrink:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\"};// button wrapper style for custom button\nconst customButtonStyle={padding:0,margin:0,border:\"none\",height:\"fit-content\",width:\"fit-content\",flexShrink:0};const wrapperFrameStyle={width:\"100%\",height:\"fit-content\",padding:`${props.wrapperFrame.padding.top}px ${props.wrapperFrame.padding.right}px ${props.wrapperFrame.padding.bottom}px ${props.wrapperFrame.padding.left}px`,borderRadius:`${props.wrapperFrame.border.radius}px`,border:`${props.wrapperFrame.border.width}px ${props.wrapperFrame.border.style} ${props.wrapperFrame.border.color}`,backgroundColor:props.wrapperFrame.backgroundColor,...props.font};// styling pseudo-element for placeholder text\nconst style=`\n  input::placeholder {\n    color: ${props.placeholderTextColor};\n  }\n  input:focus {\n    outline: none !important;\n  }\n  `;const handleSubmit=e=>{e.preventDefault();props.setStore({email});const utmTags=getUtmTags();sendEmailToZapier(email,utmTags,props.zapierWebhookUrl);setCurrentLocation(props.redirectTo);};return /*#__PURE__*/_jsxs(\"div\",{style:wrapperFrameStyle,children:[/*#__PURE__*/_jsx(\"style\",{children:style}),/*#__PURE__*/_jsxs(\"form\",{style:formStyle,onSubmit:handleSubmit,children:[/*#__PURE__*/_jsx(\"input\",{type:\"email\",value:email,onChange:e=>setEmail(e.target.value),placeholder:props.placeholderText,style:inputStyle,required:true}),props.buttonComponent&&props.buttonComponent.length>0?/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:customButtonStyle,children:props.buttonComponent}):/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:buttonStyle,children:\"See GovDash\"})]})]});}EmailForm.displayName=\"EMAIL FORM - GOVDASH\";function sendEmailToZapier(email,utmTags,zapierWebhookUrl){try{const response=fetch(zapierWebhookUrl,{method:\"POST\",body:JSON.stringify({email,...utmTags})});}catch(error){console.error(error);}}function getUtmTags(){if(typeof window===\"undefined\")return{};const utms={};const queryParams=new URLSearchParams(window.location.search);queryParams.forEach((value,key)=>{if(key.startsWith(\"utm_\")){utms[key]=value;}});return utms;}\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"EmailForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerIntrinsicWidth\":\"420\",\"framerDisableUnlink\":\"\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"64\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Email_form.map"],"mappings":"kQAeG,SAAwB,EAAU,EAAM,CAG3C,GAAK,CAAC,EAAgB,GAAoB,GAAoB,CAAM,CAAC,EAAM,GAAUA,EAAM,SAAS,GAAG,CAAO,EAAU,CAAC,QAAQ,OAAO,cAAc,MAAM,WAAW,SAAS,eAAe,WAAW,IAAI,GAAG,MAAM,OAAO,OAAO,OAAO,WAAW,EAAE,SAAS,WAAW,CAAO,EAAW,CAAC,QAAQ,GAAG,EAAM,QAAQ,IAAI,KAAK,EAAM,QAAQ,MAAM,KAAK,EAAM,QAAQ,OAAO,KAAK,EAAM,QAAQ,KAAK,IAAI,gBAAgB,cAAc,OAAO,OAAO,MAAM,EAAM,UAAU,MAAM,OAAO,OAAO,OAAO,GAAG,EAAM,KAAK,CACjf,EAAY,CAAC,QAAQ,WAAW,OAAO,OAAO,MAAM,cAAc,SAAS,OAAO,WAAW,MAAM,gBAAgB,UAAU,MAAM,QAAQ,OAAO,sBAAsB,aAAa,MAAM,OAAO,UAAU,WAAW,6BAA6B,WAAW,EAAE,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,CAC5T,EAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,OAAO,OAAO,cAAc,MAAM,cAAc,W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