{"version":3,"file":"BlogForm.Bo1pyFkd.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/t9nyyM05wjZSOqaQNdqs/HDLOAJngLTVjSlMOxCYc/BlogForm.js"],"sourcesContent":["\"use client\";import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";// Extracted styles for easy customization - Dark theme\nconst styles={container:{fontFamily:\"Geist,-apple-system, sans-serif\"},form:{display:\"flex\",flexDirection:\"column\",gap:\"16px\"},fieldContainer:{display:\"flex\",flexDirection:\"column\",gap:\"8px\"},label:{display:\"block\",fontSize:\"14px\",fontWeight:\"500\",color:\"#aaaaaa\"},required:{color:\"#ef4444\",marginLeft:\"2px\"},input:{width:\"100%\",padding:\"8px 12px\",border:\"1px solid #88888810\",borderRadius:\"8px\",height:\"40px\",fontSize:\"16px\",outline:\"none\",transition:\"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out\",boxSizing:\"border-box\",backgroundColor:\"#bababa15\",color:\"#ffffff\"},inputPlaceholder:{color:\"#999999\",opacity:1},inputFocus:{},select:{width:\"100%\",padding:\"8px 12px\",border:\"1px solid #88888810\",borderRadius:\"8px\",height:\"40px\",fontSize:\"16px\",outline:\"none\",backgroundColor:\"#bababa15\",color:\"#111111\",cursor:\"pointer\",transition:\"border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out\",boxSizing:\"border-box\"},selectPlaceholder:{color:\"#111111\"},selectOption:{backgroundColor:\"#1f2937\",color:\"#111111\"},button:{width:\"100%\",padding:\"12px 16px\",borderRadius:\"8px\",fontWeight:\"600\",fontSize:\"16px\",cursor:\"pointer\",transition:\"background-color 0.15s ease-in-out\",boxSizing:\"border-box\",// marginTop: \"16px\",\nborder:\"1px solid #555555\"},buttonEnabled:{backgroundColor:\"#121217\",color:\"#f7f7f7\"},buttonEnabledHover:{backgroundColor:\"#222222\"},buttonEnabledDark:{backgroundColor:\"#f7f7f7\",color:\"#121217\"},buttonEnabledDarkHover:{backgroundColor:\"#f7f7f780\"},buttonDisabled:{backgroundColor:\"#F5F5F5\",color:\"#141414\",cursor:\"not-allowed\"},buttonDisabledDark:{backgroundColor:\"#F5F5F5\",color:\"#141414\",cursor:\"not-allowed\"},message:{marginTop:\"16px\",padding:\"12px\",borderRadius:\"6px\",fontSize:\"14px\",display:\"flex\",alignItems:\"center\"},messageSuccess:{backgroundColor:\"#065f46\",color:\"#d1fae5\",border:\"1px solid #059669\"},messageError:{backgroundColor:\"#7f1d1d\",color:\"#fecaca\",border:\"1px solid #dc2626\"}};export default function BlogSignup(props){const[message,setMessage]=useState({type:null,text:\"\"});const[isSubmitting,setIsSubmitting]=useState(false);const[focusedField,setFocusedField]=useState(null);const[selectValue,setSelectValue]=useState(\"\");const handleSubmit=async e=>{e.preventDefault();setIsSubmitting(true);setMessage({type:null,text:\"\"})// Clear previous messages\n;const formData=new FormData(e.target);const data=Object.fromEntries(formData);const page=window.location.href;const body={...data,page};try{const response=await fetch(// \"http://localhost:3000/api/contact\",\n\"https://website-server-git-develop-avian-devs.vercel.app/api/email\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(body)});const result=await response.json();if(result.success){setMessage({type:\"success\",text:\"Thank you for your interest.\"});e.target.reset();setSelectValue(\"\")// Reset select value\n;}else{setMessage({type:\"error\",text:result.message});}}catch(error){console.error(\"Network error:\",error);setMessage({type:\"error\",text:\"Network error. Please try again.\"});}finally{setIsSubmitting(false);}};const getInputStyle=fieldName=>({...styles.input,...focusedField===fieldName?styles.inputFocus:{}});const getSelectStyle=fieldName=>({...styles.select,...focusedField===fieldName?styles.inputFocus:{},// Apply placeholder color when no value is selected\n    color:selectValue===\"\"?\"#999999\":\"#111111\"});const getButtonStyle=dark=>({...styles.button,...isSubmitting?dark?styles.buttonDisabledDark:styles.buttonDisabled:dark?styles.buttonEnabledDark:styles.buttonEnabled});const getMessageStyle=()=>({...styles.message,...message.type===\"success\"?styles.messageSuccess:styles.messageError});return /*#__PURE__*/_jsxs(\"div\",{style:styles.container,children:[/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:styles.form,children:[/*#__PURE__*/_jsxs(\"div\",{style:styles.fieldContainer,children:[/*#__PURE__*/_jsxs(\"label\",{htmlFor:\"email\",style:styles.label,children:[\"Email \",/*#__PURE__*/_jsx(\"span\",{style:styles.required,children:\"*\"})]}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",name:\"email\",id:\"email\",required:true,style:getInputStyle(\"email\"),placeholder:\"Enter your email address\",onFocus:()=>setFocusedField(\"email\"),onBlur:()=>setFocusedField(null)})]}),/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:isSubmitting,style:getButtonStyle(props.dark),onMouseEnter:e=>{if(!isSubmitting){e.target.style.backgroundColor=props.dark?styles.buttonEnabledDarkHover.backgroundColor:styles.buttonEnabledHover.backgroundColor;}},onMouseLeave:e=>{if(!isSubmitting){e.target.style.backgroundColor=props.dark?styles.buttonEnabledDark.backgroundColor:styles.buttonEnabled.backgroundColor;}},children:isSubmitting?\"Submitting...\":\"Sign Up\"})})]}),message.type&&/*#__PURE__*/_jsx(\"div\",{style:getMessageStyle(),children:message.text})]});}addPropertyControls(BlogSignup,{dark:{type:ControlType.Boolean}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogSignup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogForm.map"],"mappings":"+LAEurB,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,CAAC,KAAK,KAAK,KAAK,GAAG,CAAC,CAAM,CAAC,EAAa,GAAiBA,EAAS,GAAM,CAAM,CAAC,EAAa,GAAiBA,EAAS,KAAK,CAAM,CAAC,EAAY,GAAgBA,EAAS,GAAG,CAI/lB,OAAoB,EAA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