{"version":3,"file":"LeadGenerationForm.DV35CT2F.mjs","names":["useState","useMemo"],"sources":["https:/framerusercontent.com/modules/cpRzmu0Ln4o6R2PtCjfr/xRRtfTTPBMnshMuR3Ka2/LeadGenerationForm.js"],"sourcesContent":["// Responsive Lead Generation Form\n// - Dropdown: \"I'm interested in...\" with 5 options\n// - Text input: \"Where are you based?\"\n// - Email input\n// - Optional phone input\n// - Submit button: \"Book My Free Call\" (prominent color)\n// - On submit: show thank you message, no redirect\n// - Professional, minimalist, responsive design\n// - All fields/buttons styled consistently\n// - Vertically stacked, clean layout\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion,AnimatePresence}from\"framer-motion\";/**\n * Responsive Lead Generation Form\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function LeadGenerationForm(props){const{background,fieldBackground,fieldTextColor,labelColor,buttonColor,buttonTextColor,borderRadius,font,buttonFont,style}=props;const[form,setForm]=useState({interest:\"Emergency First Aid at Work\",location:\"\",email:\"\",phone:\"\"});const[submitted,setSubmitted]=useState(false);const[error,setError]=useState(\"\");const[animState,setAnimState]=useState(\"button\");const handleChange=e=>{const{name,value}=e.target;startTransition(()=>setForm(f=>({...f,[name]:value})));};const handleSubmit=e=>{e.preventDefault();setError(\"\");// Basic validation\nif(!form.email||!/^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$/.test(form.email)){setError(\"Please enter a valid email address.\");return;}if(!form.location.trim()){setError(\"Please enter your location.\");return;}// Animate: button -> calendar -> tick -> button\nstartTransition(()=>setAnimState(\"calendar\"));setTimeout(()=>{startTransition(()=>setAnimState(\"tick\"));setTimeout(()=>{startTransition(()=>setAnimState(\"button\"));startTransition(()=>setSubmitted(true));},900);},900);};const fieldStyle=useMemo(()=>({width:\"100%\",padding:\"12px 14px\",marginBottom:16,border:\"1px solid #E0E0E0\",borderRadius,background:fieldBackground,color:fieldTextColor,fontSize:font.fontSize,fontFamily:font.fontFamily,letterSpacing:font.letterSpacing,lineHeight:font.lineHeight,outline:\"none\",boxSizing:\"border-box\",transition:\"border-color 0.2s\"}),[fieldBackground,fieldTextColor,borderRadius,font]);const labelStyle=useMemo(()=>({display:\"block\",marginBottom:6,color:labelColor,fontWeight:500,fontSize:\"15px\",letterSpacing:\"-0.01em\"}),[labelColor]);const buttonStyle=useMemo(()=>({width:\"100%\",padding:\"14px 0\",background:buttonColor,color:buttonTextColor,border:\"none\",borderRadius,cursor:\"pointer\",fontSize:buttonFont.fontSize,fontFamily:buttonFont.fontFamily,fontWeight:buttonFont.fontWeight,letterSpacing:buttonFont.letterSpacing,lineHeight:buttonFont.lineHeight,transition:\"background 0.2s, color 0.2s\",...buttonFont}),[buttonColor,buttonTextColor,borderRadius,buttonFont]);const containerStyle=useMemo(()=>({...style,background,borderRadius,boxShadow:\"0 2px 16px rgba(0,0,0,0.04)\",padding:24,maxWidth:420,width:\"100%\",margin:\"0 auto\",display:\"flex\",flexDirection:\"column\",justifyContent:\"center\",alignItems:\"center\",boxSizing:\"border-box\"}),[background,borderRadius,style]);const formStyle=useMemo(()=>({width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:0}),[]);if(submitted){return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:{...font,color:labelColor,textAlign:\"center\",fontSize:20,fontWeight:600,padding:\"32px 0\"},children:[\"Thank you for your enquiry!\",/*#__PURE__*/_jsx(\"br\",{}),\"We'll be in touch shortly\"]})});}// Animated button/calendar/tick\nconst buttonContent=/*#__PURE__*/_jsxs(AnimatePresence,{mode:\"wait\",initial:false,children:[animState===\"button\"&&/*#__PURE__*/_jsx(motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.25},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\"},children:\"Book My Free Call\"},\"button\"),animState===\"calendar\"&&/*#__PURE__*/_jsx(motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.25},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\"},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"28\",height:\"28\",viewBox:\"0 0 28 28\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-label\":\"Calendar\",children:[/*#__PURE__*/_jsx(\"rect\",{x:\"4\",y:\"7\",width:\"20\",height:\"16\",rx:\"4\",fill:\"#fff\",stroke:buttonTextColor,strokeWidth:\"2\"}),/*#__PURE__*/_jsx(\"rect\",{x:\"4\",y:\"11\",width:\"20\",height:\"8\",fill:buttonColor}),/*#__PURE__*/_jsx(\"rect\",{x:\"8\",y:\"3\",width:\"2\",height:\"6\",rx:\"1\",fill:buttonTextColor}),/*#__PURE__*/_jsx(\"rect\",{x:\"18\",y:\"3\",width:\"2\",height:\"6\",rx:\"1\",fill:buttonTextColor})]})},\"calendar\"),animState===\"tick\"&&/*#__PURE__*/_jsx(motion.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.25},style:{display:\"flex\",alignItems:\"center\",justifyContent:\"center\",width:\"100%\"},children:/*#__PURE__*/_jsxs(\"svg\",{width:\"28\",height:\"28\",viewBox:\"0 0 28 28\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-label\":\"Success\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"14\",cy:\"14\",r:\"13\",fill:buttonColor,stroke:buttonTextColor,strokeWidth:\"2\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M8 15l4 4 8-8\",stroke:buttonTextColor,strokeWidth:\"2.5\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})]})},\"tick\")]});return /*#__PURE__*/_jsx(\"form\",{style:containerStyle,onSubmit:handleSubmit,autoComplete:\"off\",\"aria-label\":\"Lead Generation Form\",children:/*#__PURE__*/_jsxs(\"div\",{style:formStyle,children:[/*#__PURE__*/_jsx(\"label\",{style:labelStyle,htmlFor:\"interest\",children:\"I'm interested in...\"}),/*#__PURE__*/_jsxs(\"select\",{id:\"interest\",name:\"interest\",value:form.interest,onChange:handleChange,style:{...fieldStyle,appearance:\"none\",WebkitAppearance:\"none\",MozAppearance:\"none\",backgroundPosition:\"right 12px center\",backgroundRepeat:\"no-repeat\"},required:true,children:[/*#__PURE__*/_jsx(\"option\",{children:\"Emergency First Aid at Work\"}),/*#__PURE__*/_jsx(\"option\",{children:\"Paediatric First Aid\"}),/*#__PURE__*/_jsx(\"option\",{children:\"Manual Handling\"}),/*#__PURE__*/_jsx(\"option\",{children:\"Mental Health First Aid\"}),/*#__PURE__*/_jsx(\"option\",{children:\"A course tailored for my business\"})]}),/*#__PURE__*/_jsx(\"label\",{style:labelStyle,htmlFor:\"location\",children:\"Where are you based?\"}),/*#__PURE__*/_jsx(\"input\",{id:\"location\",name:\"location\",type:\"text\",placeholder:\"Where are you based?\",value:form.location,onChange:handleChange,style:fieldStyle,required:true,autoComplete:\"off\"}),/*#__PURE__*/_jsx(\"label\",{style:labelStyle,htmlFor:\"email\",children:\"Email\"}),/*#__PURE__*/_jsx(\"input\",{id:\"email\",name:\"email\",type:\"email\",placeholder:\"Email address\",value:form.email,onChange:handleChange,style:fieldStyle,required:true,autoComplete:\"off\"}),/*#__PURE__*/_jsx(\"label\",{style:labelStyle,htmlFor:\"phone\",children:\"Phone (optional)\"}),/*#__PURE__*/_jsx(\"input\",{id:\"phone\",name:\"phone\",type:\"tel\",placeholder:\"Phone number (optional)\",value:form.phone,onChange:handleChange,style:fieldStyle,autoComplete:\"off\"}),error&&/*#__PURE__*/_jsx(\"div\",{style:{color:\"#D32F2F\",fontSize:14,marginBottom:8},children:error}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",style:buttonStyle,\"aria-label\":\"Book My Free Call\",disabled:animState!==\"button\",children:buttonContent})]})});}addPropertyControls(LeadGenerationForm,{background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},fieldBackground:{type:ControlType.Color,title:\"Field Background\",defaultValue:\"#F5F5F5\"},fieldTextColor:{type:ControlType.Color,title:\"Field Text\",defaultValue:\"#222222\"},labelColor:{type:ControlType.Color,title:\"Label Color\",defaultValue:\"#222222\"},buttonColor:{type:ControlType.Color,title:\"Button Color\",defaultValue:\"#0066FF\"},buttonTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#FFFFFF\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}},buttonFont:{type:ControlType.Font,title:\"Button Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"16px\",variant:\"Semibold\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LeadGenerationForm\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LeadGenerationForm.map"],"mappings":"uPAeG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,aAAW,kBAAgB,iBAAe,aAAW,cAAY,kBAAgB,eAAa,OAAK,aAAW,SAAO,EAAW,CAAC,EAAK,GAASA,EAAS,CAAC,SAAS,8BAA8B,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAM,CAAC,EAAM,GAAUA,EAAS,GAAG,CAAM,CAAC,EAAU,GAAcA,EAAS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