{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/Y9NGZAE2fsbS6NYIOCmC/8JwuwJQkgg74LbucPP8P/MailchimpForm.js"],
  "sourcesContent": ["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import MailchimpSubscribe from\"react-mailchimp-subscribe\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight fixed\n */export default function MailchimpForm(props){const url=props.formUrl;return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsx(MailchimpSubscribe,{url:url,render:({subscribe,status,message})=>/*#__PURE__*/_jsx(CustomForm,{otherProps:props,status:status,message:message,onValidated:formData=>subscribe(formData)})})});}const CustomForm=({status,message,onValidated,otherProps})=>{let email,fname,tags;const submit=()=>email&&fname&&tags&&email.value.indexOf(\"@\")>-1&&onValidated({EMAIL:email.value,FNAME:fname.value,tags:tags.value});const success=()=>{return /*#__PURE__*/_jsx(\"div\",{style:{...thankYouStyle,fontSize:`${otherProps.fontSize}px`},children:otherProps.success});};const error=()=>{return /*#__PURE__*/_jsx(\"div\",{dangerouslySetInnerHTML:{__html:message},style:{...thankYouStyle,fontSize:`${otherProps.fontSize}px`,color:\"red\"},children:\"Sorry there was an error. Refresh the page and try again.\"});};const renderForm=()=>{return /*#__PURE__*/_jsxs(\"div\",{style:{...formStyle,gap:`${otherProps.buttonGap}px`},children:[/*#__PURE__*/_jsxs(\"div\",{style:{...inputGroupStyle,gap:`${otherProps.labelGap}px`},children:[/*#__PURE__*/_jsx(\"input\",{disabled:status===\"sending\",style:{...inputStyle,fontSize:`${otherProps.fontSize}px`,padding:`${otherProps.inputPadding}px`},ref:node=>fname=node,type:\"text\",placeholder:otherProps.namePlaceholder}),/*#__PURE__*/_jsx(\"input\",{disabled:status===\"sending\",style:{...inputStyle,fontSize:`${otherProps.fontSize}px`,padding:`${otherProps.inputPadding}px`},ref:node=>email=node,type:\"email\",placeholder:otherProps.mailPlaceholder}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"tags\",value:otherProps.tag,ref:node=>tags=node})]}),/*#__PURE__*/_jsx(\"button\",{disabled:status===\"sending\",style:{...buttonStyle,fontSize:`${otherProps.fontSize}px`,padding:`${otherProps.buttonPadding}px`},onClick:submit,children:status===\"sending\"?\"Sending\":otherProps.buttonLabel})]});};// {status === \"sending\" && (\n//         <div style={{ color: \"blue\" }}>sending...</div>\n//     )}\n//     {status === \"error\" && (\n//         <div\n//             style={{ color: \"red\" }}\n//             dangerouslySetInnerHTML={{ __html: message }}\n//         />\n//     )}\n//     {status === \"success\" && (\n//         <div\n//             style={{ color: \"green\" }}\n//             dangerouslySetInnerHTML={{ __html: message }}\n//         />\n//     )}\nif(status===\"success\"){return success();}else if(status===\"error\"){return error();}else{return renderForm();}};MailchimpForm.defaultProps={formUrl:\"https://pixeltinkers.us18.list-manage.com/subscribe/post?u=d3697f953b293488727033500&amp;id=7e6c54dd08&amp;f_id=00a9c2e1f0\",namePlaceholder:\"Your name\",mailPlaceholder:\"Your mail\",buttonLabel:\"Subscribe\",fontSize:18,inputPadding:8,buttonPadding:8,success:\"Thank you for subscribing.\",buttonGap:16,labelGap:8,tag:196};addPropertyControls(MailchimpForm,{formUrl:{type:ControlType.String,title:\"Form url\"},namePlaceholder:{type:ControlType.String,title:\"Name placeholder\"},mailPlaceholder:{type:ControlType.String,title:\"Mail placeholder\"},buttonLabel:{type:ControlType.String,title:\"Button label\"},fontSize:{type:ControlType.Number,title:\"Font size\"},inputPadding:{type:ControlType.Number,title:\"Input padding\"},buttonPadding:{type:ControlType.Number,title:\"Button padding\"},success:{type:ControlType.String,title:\"Success message\"},buttonGap:{type:ControlType.Number,title:\"Button gap\"},labelGap:{type:ControlType.Number,title:\"Button gap\"},tag:{type:ControlType.Number,title:\"Tag\"}});// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\",height:\"100%\",fontFamily:'\"Bricolage Grotesque\", \"Bricolage Grotesque Placeholder\", sans-serif;'};const buttonStyle={fontFamily:`\"Bricolage Grotesque\", \"Bricolage Grotesque Placeholder\", sans-serif`,background:\"black\",border:\"none\",color:\"white\",fontSize:\"20px\",borderRadius:\"8px\",padding:\"8px\",width:\"100%\",cursor:\"pointer\"};const formStyle={width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:\"8px\"};const inputGroupStyle={width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:\"8px\"};const inputStyle={fontSize:\"20px\",padding:\"8px\",borderRadius:\"8px\",border:\"solid 1px gray\",fontFamily:`\"Bricolage Grotesque\", \"Bricolage Grotesque Placeholder\", sans-serif`};const thankYouStyle={fontSize:\"20px\",textAlign:\"center\",maxWidth:\"400px\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MailchimpForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MailchimpForm.map"],
  "mappings": "uGAQkB,SAARA,EAA+BC,EAAM,CAAC,IAAMC,EAAID,EAAM,QAAQ,OAAoBE,EAAK,MAAM,CAAC,MAAMC,EAAe,SAAsBD,EAAKE,EAAmB,CAAC,IAAIH,EAAI,OAAO,CAAC,CAAC,UAAAI,EAAU,OAAAC,EAAO,QAAAC,CAAO,IAAiBL,EAAKM,EAAW,CAAC,WAAWR,EAAM,OAAOM,EAAO,QAAQC,EAAQ,YAAYE,GAAUJ,EAAUI,CAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,IA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AAO,WAAW,uEAAuE,EAAQsB,EAAY,CAAC,WAAW,uEAAuE,WAAW,QAAQ,OAAO,OAAO,MAAM,QAAQ,SAAS,OAAO,aAAa,MAAM,QAAQ,MAAM,MAAM,OAAO,OAAO,SAAS,EAAQJ,EAAU,CAAC,MAAM,OAAO,QAAQ,OAAO,cAAc,SAAS,IAAI,KAAK,EAAQC,EAAgB,CAAC,MAAM,OAAO,QAAQ,OAAO,cAAc,SAAS,IAAI,KAAK,EAAQC,EAAW,CAAC,SAAS,OAAO,QAAQ,MAAM,aAAa,MAAM,OAAO,iBAAiB,WAAW,sEAAsE,EAAQN,EAAc,CAAC,SAAS,OAAO,UAAU,SAAS,SAAS,OAAO",
  "names": ["MailchimpForm", "props", "url", "p", "containerStyle", "lib_default", "subscribe", "status", "message", "CustomForm", "formData", "onValidated", "otherProps", "email", "fname", "tags", "submit", "success", "thankYouStyle", "error", "renderForm", "u", "formStyle", "inputGroupStyle", "inputStyle", "node", "buttonStyle", "addPropertyControls", "ControlType"]
}
