{"version":3,"file":"Solved6WebhookLeadForm.BoPFUurg.mjs","names":["useState","useMemo","useCallback"],"sources":["https:/framerusercontent.com/modules/SxZgFBK7zXg1vyS8WOGv/cSxHvsz14ZJECy9rm12C/Solved6WebhookLeadForm.js"],"sourcesContent":["// Create a new Framer code component named Solved6WebhookLeadForm that renders a lead capture form posting JSON to https://solved6ai.app.n8n.cloud/webhook/solved6-audit with fields name, email, phone, company, website, industry, market; required validation for name/email/website/industry; configurable property controls (market, phonePlaceholder, endpoint, submitLabel, helperText, successMessage, errorMessage, cardBG, inputBG, border, text, muted, btnStart, btnEnd, btnText, success, error, radius, fonts); compact responsive card styling matching existing Solved6 lead forms; and custom fetch-based submit behavior without native Framer form submission.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{startTransition,useCallback,useMemo,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function Solved6WebhookLeadForm(props){const{market,phonePlaceholder,endpoint,submitLabel,helperText,successMessage,errorMessage,cardBG,inputBG,border,text,muted,btnStart,btnEnd,btnText,success,error,radius,bodyFont,buttonFont}=props;const[isLoading,setIsLoading]=useState(false);const[status,setStatus]=useState(\"idle\");const industries=useMemo(()=>[\"Retail & e-commerce\",\"Real Estate\",\"Healthcare\",\"Finance & Insurance\",\"Travel & Hospitality\",\"Education\",\"Professional Services\",\"Technology & SaaS\",\"Automotive\",\"Other\"],[]);const sharedInputStyle=useMemo(()=>({width:\"100%\",height:44,borderRadius:Math.max(8,radius-4),border:`1px solid ${border}`,background:inputBG,color:text,padding:\"0 14px\",outline:\"none\",boxSizing:\"border-box\",...bodyFont}),[radius,border,inputBG,text,bodyFont]);const onSubmit=useCallback(async event=>{event.preventDefault();startTransition(()=>setIsLoading(true));startTransition(()=>setStatus(\"idle\"));const formData=new FormData(event.currentTarget);const payload={name:String(formData.get(\"name\")??\"\"),email:String(formData.get(\"email\")??\"\"),phone:String(formData.get(\"phone\")??\"\"),company:String(formData.get(\"company\")??\"\"),website:String(formData.get(\"website\")??\"\"),industry:String(formData.get(\"industry\")??\"\"),market:String(market??\"intl\")};try{const response=await fetch(endpoint,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(payload)});if(response.ok){startTransition(()=>setStatus(\"success\"));event.currentTarget.reset();}else{startTransition(()=>setStatus(\"error\"));}}catch(_err){startTransition(()=>setStatus(\"error\"));}finally{startTransition(()=>setIsLoading(false));}},[endpoint,market]);const statusMessage=status===\"success\"?successMessage:status===\"error\"?errorMessage:helperText;const statusColor=status===\"success\"?success:status===\"error\"?error:muted;return /*#__PURE__*/_jsxs(\"form\",{onSubmit:onSubmit,style:{position:\"relative\",width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:16,padding:16,borderRadius:radius,background:cardBG,border:`1px solid ${border}`,boxShadow:\"0 8px 24px rgba(0, 0, 0, 0.08)\",boxSizing:\"border-box\",backdropFilter:\"blur(8px)\"},\"aria-busy\":isLoading,children:[/*#__PURE__*/_jsxs(\"div\",{style:{display:\"grid\",gridTemplateColumns:\"repeat(auto-fit, minmax(220px, 1fr))\",gap:16,width:\"100%\"},children:[/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,color:text},children:[/*#__PURE__*/_jsx(\"span\",{style:{...bodyFont,color:text},children:\"Name *\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"name\",required:true,style:sharedInputStyle})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,color:text},children:[/*#__PURE__*/_jsx(\"span\",{style:{...bodyFont,color:text},children:\"Email *\"}),/*#__PURE__*/_jsx(\"input\",{type:\"email\",name:\"email\",required:true,style:sharedInputStyle})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,color:text},children:[/*#__PURE__*/_jsx(\"span\",{style:{...bodyFont,color:text},children:\"Phone\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"phone\",placeholder:phonePlaceholder,style:sharedInputStyle})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,color:text},children:[/*#__PURE__*/_jsx(\"span\",{style:{...bodyFont,color:text},children:\"Company\"}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"company\",style:sharedInputStyle})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,color:text},children:[/*#__PURE__*/_jsx(\"span\",{style:{...bodyFont,color:text},children:\"Website *\"}),/*#__PURE__*/_jsx(\"input\",{type:\"url\",name:\"website\",required:true,style:sharedInputStyle})]}),/*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",flexDirection:\"column\",gap:8,color:text},children:[/*#__PURE__*/_jsx(\"span\",{style:{...bodyFont,color:text},children:\"Industry *\"}),/*#__PURE__*/_jsx(\"select\",{name:\"industry\",required:true,defaultValue:industries[0],style:sharedInputStyle,children:industries.map(item=>/*#__PURE__*/_jsx(\"option\",{value:item,children:item},item))})]})]}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:isLoading,style:{width:\"100%\",minHeight:44,border:\"none\",borderRadius:Math.max(8,radius-4),background:`linear-gradient(90deg, ${btnStart} 0%, ${btnEnd} 100%)`,color:btnText,cursor:isLoading?\"not-allowed\":\"pointer\",opacity:isLoading?.85:1,transition:\"opacity 0.2s ease\",padding:\"12px 16px\",...buttonFont},children:isLoading?\"Submitting...\":submitLabel}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:statusColor,...bodyFont},children:statusMessage})]});}addPropertyControls(Solved6WebhookLeadForm,{market:{type:ControlType.Enum,options:[\"intl\",\"uae\",\"il\"],optionTitles:[\"intl\",\"uae\",\"il\"],defaultValue:\"intl\"},phonePlaceholder:{type:ControlType.String,defaultValue:\"+1\"},endpoint:{type:ControlType.String,defaultValue:\"https://solved6ai.app.n8n.cloud/webhook/solved6-audit\"},submitLabel:{type:ControlType.String,defaultValue:\"Show me what AI says about my business\"},helperText:{type:ControlType.String,defaultValue:\"Report within 24 hours. No spam, no obligation.\"},successMessage:{type:ControlType.String,defaultValue:\"Thanks - your AI visibility check is on the way. Check your inbox within 24 hours.\"},errorMessage:{type:ControlType.String,defaultValue:\"Something went wrong - please try again or email us.\"},cardBG:{type:ControlType.Color,defaultValue:\"#FFFFFF\"},inputBG:{type:ControlType.Color,defaultValue:\"#F5F5F5\"},border:{type:ControlType.Color,defaultValue:\"#EEEEEE\"},text:{type:ControlType.Color,defaultValue:\"#000000\"},muted:{type:ControlType.Color,defaultValue:\"#CCCCCC\"},btnStart:{type:ControlType.Color,defaultValue:\"#000000\"},btnEnd:{type:ControlType.Color,defaultValue:\"#CCCCCC\"},btnText:{type:ControlType.Color,defaultValue:\"#FFFFFF\"},success:{type:ControlType.Color,defaultValue:\"#000000\"},error:{type:ControlType.Color,defaultValue:\"#CCCCCC\"},radius:{type:ControlType.Number,defaultValue:16,min:0,max:40,step:1},bodyFont:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",lineHeight:\"1.35em\",letterSpacing:\"-0.01em\",variant:\"Medium\"}},buttonFont:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",lineHeight:\"1em\",letterSpacing:\"-0.01em\",variant:\"Semibold\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Solved6WebhookLeadForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Solved6WebhookLeadForm.map"],"mappings":"sMAIG,SAAwB,EAAuB,EAAM,CAAC,GAAK,CAAC,SAAO,mBAAiB,WAAS,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