{"version":3,"file":"ConvertKitSignup.RZ7FUal5.mjs","names":["React.useState","p"],"sources":["https:/framerusercontent.com/modules/4gm1PbdZkzLBKQ7Rx55g/Y6D5nXqnUPFVD6eW1nlE/ConvertKitSignup.js"],"sourcesContent":["// ConvertKitSignup.jsx\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function ConvertKitSignup(p){const[first,setFirst]=React.useState(\"\");const[email,setEmail]=React.useState(\"\");const[loading,setLoading]=React.useState(false);const[message,setMessage]=React.useState(null);const[hover,setHover]=React.useState(false);const[pressed,setPressed]=React.useState(false);async function subscribe(e){e.preventDefault();setMessage(null);if(!email||!email.includes(\"@\")){setMessage(\"Enter a valid email.\");return;}setLoading(true);try{const res=await fetch(`https://api.convertkit.com/v3/forms/${p.formId}/subscribe`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({api_key:p.apiKey,email,first_name:first})});const data=await res.json();if(res.ok){setMessage(\"Check your inbox to confirm.\");if(p.redirectUrl)setTimeout(()=>window.location.href=p.redirectUrl,800);}else{setMessage(data?.message||\"Something went wrong. Try again.\");}}catch{setMessage(\"Network error. Try again.\");}finally{setLoading(false);}}// ---- CARD (glassy Dark Olive) ----\nconst card={width:\"100%\",display:\"grid\",gap:14,padding:22,borderRadius:22,// layered background for depth: soft top highlight -> subtle bottom dark\nbackground:\"linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 12%, rgba(0,0,0,0.18) 100%), #292C27\",// a touch of glassiness without going mushy\nbackdropFilter:\"blur(2px) saturate(112%)\",WebkitBackdropFilter:\"blur(2px) saturate(112%)\",// gentle edge definition + inner highlights\nborder:\"1px solid rgba(255,255,255,0.06)\",boxShadow:\"0 8px 26px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -1px 0 rgba(0,0,0,0.25)\",color:\"white\"};const input={width:\"100%\",height:44,padding:\"0 14px\",borderRadius:12,border:\"1.5px solid rgba(0,0,0,0.3)\",background:\"white\",fontFamily:\"Inter\",fontSize:15,fontWeight:600,color:\"#292C27\",outline:\"none\",transition:\"box-shadow 120ms ease, border-color 120ms ease\",boxShadow:\"inset 0 1px 0 rgba(255,255,255,0.6)\"};const inputFocus={boxShadow:\"0 0 0 3px rgba(165,255,122,0.35)\",borderColor:\"rgba(165,255,122,0.65)\"};// ---- BUTTON (inner shadow for tactile feel) ----\nconst button={width:\"100%\",height:48,border:\"none\",borderRadius:14,background:\"linear-gradient(180deg,#A5FF7A 0%, #86F858 100%)\",color:\"#292C27\",fontFamily:`\"Gilroy\", Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial`,fontWeight:800,letterSpacing:.4,fontSize:16,cursor:loading?\"not-allowed\":\"pointer\",transform:pressed?\"scale(0.985)\":hover?\"scale(1.03)\":\"none\",transition:\"transform 120ms ease, filter 120ms ease\",// inner shadows first, then outer drop for lift\nboxShadow:\"inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -4px 10px rgba(0,0,0,0.25), 0 8px 22px rgba(165,255,122,0.35)\"};return /*#__PURE__*/_jsxs(\"form\",{onSubmit:subscribe,style:card,children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",placeholder:p.placeholderName,value:first,onChange:e=>setFirst(e.target.value),onFocus:e=>{e.currentTarget.style.boxShadow=`${inputFocus.boxShadow}`;e.currentTarget.style.borderColor=`${inputFocus.borderColor}`;},onBlur:e=>{e.currentTarget.style.boxShadow=\"inset 0 1px 0 rgba(255,255,255,0.6)\";e.currentTarget.style.borderColor=\"rgba(0,0,0,0.3)\";},style:input}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",placeholder:p.placeholderEmail,value:email,onChange:e=>setEmail(e.target.value),onFocus:e=>{e.currentTarget.style.boxShadow=`${inputFocus.boxShadow}`;e.currentTarget.style.borderColor=`${inputFocus.borderColor}`;},onBlur:e=>{e.currentTarget.style.boxShadow=\"inset 0 1px 0 rgba(255,255,255,0.6)\";e.currentTarget.style.borderColor=\"rgba(0,0,0,0.3)\";},style:input,required:true}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:button,disabled:loading,onMouseEnter:()=>setHover(true),onMouseLeave:()=>{setHover(false);setPressed(false);},onMouseDown:()=>setPressed(true),onMouseUp:()=>setPressed(false),children:loading?\"Submitting...\":p.buttonLabel}),p.noteText&&/*#__PURE__*/_jsx(\"div\",{style:{fontSize:12,opacity:.7},children:p.noteText}),message&&/*#__PURE__*/_jsx(\"div\",{style:{fontSize:13},children:message}),/*#__PURE__*/_jsx(\"style\",{children:`input::placeholder { \n                    color: rgba(41,44,39,.55);  /* #292C27 @ 55% */\n                    font-weight: 600;\n                    letter-spacing: .2px;\n                }\n                input::-webkit-input-placeholder { color: rgba(41,44,39,.55); }\n                input::-moz-placeholder { color: rgba(41,44,39,.55); }\n                input:-ms-input-placeholder { color: rgba(41,44,39,.55); }`})]});}addPropertyControls(ConvertKitSignup,{formId:{type:ControlType.String,title:\"Form Id\",defaultValue:\"\"},apiKey:{type:ControlType.String,title:\"API Key\",defaultValue:\"\"},placeholderName:{type:ControlType.String,title:\"Name PH\",defaultValue:\"Name\"},placeholderEmail:{type:ControlType.String,title:\"Email PH\",defaultValue:\"Email\"},buttonLabel:{type:ControlType.String,title:\"Button\",defaultValue:\"Send Me The PDF →\"},redirectUrl:{type:ControlType.String,title:\"Redirect URL\",defaultValue:\"\"},noteText:{type:ControlType.String,title:\"Note\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ConvertKitSignup\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ConvertKitSignup.map"],"mappings":"iTACyI,SAAwB,EAAiB,EAAE,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAe,GAAG,CAAM,CAAC,EAAM,GAAUA,EAAe,GAAG,CAAM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