{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/h0OztpXC5iezoyLPVyLT/m7OlN33vzRCTuKgVNen3/MailerLite.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function MailerLiteForm(props){const{placeholder,buttonLabel,action,font,fontSize,lineHeight,textTransform,borderRadius,borderColor,borderWidth,buttonRadius,buttonTextColor,buttonBgColor,width,height}=props;const[email,setEmail]=useState(\"\");const[submitted,setSubmitted]=useState(false);const[error,setError]=useState(false);const handleSubmit=async e=>{e.preventDefault();setSubmitted(false);setError(false);const url=action+`?fields%5Bemail%5D=${encodeURIComponent(email)}&ml-submit=1&anticsrf=true`;try{await fetch(url,{method:\"GET\",mode:\"no-cors\"});setSubmitted(true);setEmail(\"\");}catch(err){setError(true);}};return /*#__PURE__*/_jsxs(\"div\",{style:{width,height,display:\"flex\",alignItems:\"center\",justifyContent:\"flex-start\"},children:[!submitted?/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:{display:\"flex\",flexDirection:\"row\",alignItems:\"center\",gap:\"8px\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"input\",{name:\"fields[email]\",type:\"email\",placeholder:placeholder,value:email,onChange:e=>setEmail(e.target.value),required:true,style:{fontFamily:font.family,fontSize,lineHeight,textTransform,padding:\"12px 16px\",borderRadius,borderColor,borderWidth,borderStyle:\"solid\",width:\"100%\",boxSizing:\"border-box\",background:\"transparent\",color:\"white\"}}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:{backgroundColor:buttonBgColor,color:buttonTextColor,padding:\"12px 20px\",borderRadius:buttonRadius,border:\"none\",fontFamily:font.family,fontSize,lineHeight,textTransform,cursor:\"pointer\"},children:buttonLabel})]}):/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:font.family,fontSize,lineHeight,color:\"white\",display:\"flex\",alignItems:\"center\",justifyContent:\"flex-start\",height:\"100%\",width:\"100%\",padding:\"12px 16px 12px 0px\"},children:\"Thanks! You'll shortly receive the latest newsletter per mail.\"}),error&&/*#__PURE__*/_jsx(\"span\",{style:{color:\"red\",fontSize:14,marginLeft:12},children:\"Something went wrong.\"})]});}addPropertyControls(MailerLiteForm,{placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Email\"},buttonLabel:{type:ControlType.String,title:\"Button Label\",defaultValue:\"Subscribe\"},action:{type:ControlType.String,title:\"Action URL\",defaultValue:\"https://assets.mailerlite.com/jsonp/295320/forms/155466620733491141/subscribe\"},font:{type:ControlType.Font,title:\"Font\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16},lineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.4},textTransform:{type:ControlType.Enum,title:\"Text Transform\",options:[\"none\",\"uppercase\",\"lowercase\",\"capitalize\"],defaultValue:\"none\"},borderRadius:{type:ControlType.Number,title:\"Input Radius\",defaultValue:4},borderColor:{type:ControlType.Color,title:\"Input Border Color\",defaultValue:\"#ffffff\"},borderWidth:{type:ControlType.Number,title:\"Input Border Width\",defaultValue:1},buttonRadius:{type:ControlType.Number,title:\"Button Radius\",defaultValue:4},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#000000\"},buttonBgColor:{type:ControlType.Color,title:\"Button Background\",defaultValue:\"#C4C1AE\"},width:{type:ControlType.String,title:\"Width\",defaultValue:\"100%\"},height:{type:ControlType.String,title:\"Height\",defaultValue:\"auto\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MailerLiteForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MailerLite.map"],
  "mappings": "uGAAwJ,SAARA,EAAgCC,EAAM,CAAC,GAAK,CAAC,YAAAC,EAAY,YAAAC,EAAY,OAAAC,EAAO,KAAAC,EAAK,SAAAC,EAAS,W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AAE,gBAAgB,CAAC,KAAKA,EAAY,MAAM,MAAM,cAAc,aAAa,SAAS,EAAE,cAAc,CAAC,KAAKA,EAAY,MAAM,MAAM,oBAAoB,aAAa,SAAS,EAAE,MAAM,CAAC,KAAKA,EAAY,OAAO,MAAM,QAAQ,aAAa,MAAM,EAAE,OAAO,CAAC,KAAKA,EAAY,OAAO,MAAM,SAAS,aAAa,MAAM,CAAC,CAAC",
  "names": ["MailerLiteForm", "props", "placeholder", "buttonLabel", "action", "font", "fontSize", "lineHeight", "textTransform", "borderRadius", "borderColor", "borderWidth", "buttonRadius", "buttonTextColor", "buttonBgColor", "width", "height", "email", "setEmail", "ye", "submitted", "setSubmitted", "error", "setError", "u", "p", "e", "url", "addPropertyControls", "ControlType"]
}
