{"version":3,"file":"NewsletterForm.DzTCYYQr.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/nuu26pZbejHyxVVifF1Q/K4T5IHxZy63TJqmb4HX1/NewsletterForm.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * MailchimpForm — Jeanda Agency\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 520\n */export default function MailchimpForm(props){const{mailchimpU,mailchimpId,mailchimpFId,tagId,buttonText,successMessage,showInterests,accentColor,textColor,hoverTextColor,font}=props;const[fname,setFname]=React.useState(\"\");const[lname,setLname]=React.useState(\"\");const[email,setEmail]=React.useState(\"\");const[interest,setInterest]=React.useState(\"\");const[status,setStatus]=React.useState(\"idle\");const[errorMsg,setErrorMsg]=React.useState(\"\");const interests=[\"Santa Fe\",\"Charleston\",\"wellness travel & events\",\"partner opportunities\"];function handleSubmit(e){e.preventDefault();if(!email||!fname||!lname){setStatus(\"error\");setErrorMsg(\"Please fill in all fields.\");return;}setStatus(\"loading\");// JSONP: evita CORS con Mailchimp\nconst cb=\"mcCallback_\"+Date.now();window[cb]=data=>{if(data.result===\"success\"){setStatus(\"success\");}else{setStatus(\"error\");setErrorMsg((data.msg||\"Something went wrong.\").replace(/^\\d+\\s*-\\s*/,\"\"));}delete window[cb];script.remove();};const params=new URLSearchParams({u:mailchimpU,id:mailchimpId,f_id:mailchimpFId,EMAIL:email,FNAME:fname,LNAME:lname,c:cb});if(showInterests&&interest)params.set(\"MMERGE14\",interest);if(tagId)params.set(\"tags\",tagId);const script=document.createElement(\"script\");script.src=`https://health.us18.list-manage.com/subscribe/post-json?${params.toString()}`;script.onerror=()=>{setStatus(\"error\");setErrorMsg(\"Network error. Please try again.\");delete window[cb];script.remove();};document.body.appendChild(script);}const inputStyle={width:\"100%\",border:\"none\",borderBottom:`1px solid ${textColor}`,borderRadius:0,background:\"transparent\",padding:\"8px 0\",fontSize:13,letterSpacing:\"0.12em\",textTransform:\"uppercase\",color:textColor,outline:\"none\",fontFamily:\"inherit\"};const labelPlaceholderCss=`\n        .mc-jeanda input::placeholder {\n            font-size: 11px;\n            font-weight: 500;\n            letter-spacing: 0.12em;\n            text-transform: uppercase;\n            color: ${textColor};\n            opacity: 1;\n        }\n        .mc-jeanda input:focus {\n            border-bottom-color: ${accentColor} !important;\n        }\n    `;if(status===\"success\"){return /*#__PURE__*/_jsx(\"div\",{style:{...font,color:textColor,fontSize:14,letterSpacing:\"0.08em\",textTransform:\"uppercase\",padding:\"24px 0\"},children:successMessage});}return /*#__PURE__*/_jsxs(\"form\",{className:\"mc-jeanda\",onSubmit:handleSubmit,style:{...font,width:\"100%\",display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"style\",{children:labelPlaceholderCss}),/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:36},children:/*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:\"First Name\",value:fname,onChange:e=>setFname(e.target.value),style:inputStyle})}),/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:36},children:/*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:\"Last Name\",value:lname,onChange:e=>setLname(e.target.value),style:inputStyle})}),/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:36},children:/*#__PURE__*/_jsx(\"input\",{type:\"email\",placeholder:\"Email\",value:email,onChange:e=>setEmail(e.target.value),style:inputStyle})}),showInterests&&/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:36},children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:11,fontWeight:500,letterSpacing:\"0.12em\",textTransform:\"uppercase\",color:textColor,marginBottom:10},children:\"I'm most interested in\"}),interests.map(opt=>/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",alignItems:\"center\",gap:8,fontSize:14,color:textColor,marginBottom:8,cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"input\",{type:\"radio\",name:\"MMERGE14\",value:opt,checked:interest===opt,onChange:()=>setInterest(opt),style:{accentColor}}),opt]},opt))]}),status===\"error\"&&/*#__PURE__*/_jsx(\"div\",{style:{color:accentColor,fontSize:13,marginBottom:16},children:errorMsg}),/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:status===\"loading\",style:{display:\"inline-block\",background:\"transparent\",border:`1px solid ${accentColor}`,borderRadius:999,color:accentColor,fontSize:12,fontWeight:500,letterSpacing:\"0.15em\",textTransform:\"uppercase\",padding:\"16px 40px\",lineHeight:1,cursor:status===\"loading\"?\"wait\":\"pointer\",fontFamily:\"inherit\",transition:\"background 0.2s, color 0.2s\",opacity:status===\"loading\"?.6:1},onMouseEnter:e=>{e.currentTarget.style.background=accentColor;e.currentTarget.style.color=hoverTextColor;},onMouseLeave:e=>{e.currentTarget.style.background=\"transparent\";e.currentTarget.style.color=accentColor;},children:status===\"loading\"?\"...\":buttonText})})]});}MailchimpForm.defaultProps={mailchimpU:\"75dbce5ade206019896fdc80d\",mailchimpId:\"aed5186a18\",mailchimpFId:\"0093abe6f0\",tagId:\"3056421\",buttonText:\"Stay Connected\",successMessage:\"Thank you for subscribing!\",showInterests:true,accentColor:\"#E8622C\",textColor:\"#2B2B2B\",hoverTextColor:\"#FFFFFF\"};addPropertyControls(MailchimpForm,{mailchimpU:{type:ControlType.String,title:\"MC User (u)\"},mailchimpId:{type:ControlType.String,title:\"MC List (id)\"},mailchimpFId:{type:ControlType.String,title:\"MC Form (f_id)\"},tagId:{type:ControlType.String,title:\"MC Tag\"},buttonText:{type:ControlType.String,title:\"Button Text\"},successMessage:{type:ControlType.String,title:\"Success Msg\"},showInterests:{type:ControlType.Boolean,title:\"Interests\"},accentColor:{type:ControlType.Color,title:\"Accent\"},textColor:{type:ControlType.Color,title:\"Text\"},hoverTextColor:{type:ControlType.Color,title:\"Hover Text\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",displayFontSize:false,displayTextAlignment:false,defaultFontType:\"sans-serif\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MailchimpForm\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"520\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./NewsletterForm.map"],"mappings":"+LAMG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,aAAW,cAAY,eAAa,QAAM,aAAW,iBAAe,gBAAc,cAAY,YAAU,iBAAe,QAAM,EAAW,CAAC,EAAM,GAAUA,EAAe,EAAE,EAAO,CAAC,EAAM,GAAUA,EAAe,EAAE,EAAO,CAAC,EAAM,GAAUA,EAAe,EAAE,EAAO,CAAC,EAAS,GAAaA,EAAe,EAAE,EAAO,CAAC,EAAO,GAAWA,EAAe,MAAM,EAAO,CAAC,EAAS,GAAaA,EAAe,EAAE,EAAQ,EAAU,CAAC,WAAW,aAAa,2BAA2B,uBAAuB,EAAE,SAAS,EAAa,EAAE,CAAoB,GAAnB,EAAE,eAAe,EAAK,CAAC,GAAO,CAAC,GAAO,CAAC,EAAM,CAAC,EAAU,OAAO,EAAE,EAAY,4BAA4B,EAAE,MAAO,CAAC,EAAU,SAAS,EAC7rB,IAAM,EAAG,cAAc,KAAK,IAAI,EAAE,EAAO,GAAI,GAAM,CAAI,EAAK,SAAS,UAAW,EAAU,SAAS,GAAQ,EAAU,OAAO,EAAE,GAAa,EAAK,KAAK,wBAAA,CAAyB,QAAQ,cAAc,EAAE,CAAC,GAAG,OAAO,EAAO,GAAI,EAAO,OAAO,CAAE,EAAE,IAAM,EAAO,IAAI,gBAAgB,CAAC,EAAE,EAAW,GAAG,EAAY,KAAK,EAAa,MAAM,EAAM,MAAM,EAAM,MAAM,EAAM,EAAE,CAAE,CAAC,EAAK,GAAe,GAAS,EAAO,I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