{"version":3,"file":"LeadForm.D0M6vU8J.mjs","names":["React.useContext","React.useMemo","React.Fragment","React.forwardRef","useRef","React.useId","RichText","useRef"],"sources":["https:/framerusercontent.com/modules/OfCYestjJ5WHhBkX5dh0/xaJ6kKjed3URUiFmha25/f4qVu0GsN.js","https:/framerusercontent.com/modules/q9I9LhdpvSFGaVwS0vs8/Yvf1mcqBaXJxbsdvv8MZ/LeadForm.js"],"sourcesContent":["// Generated by Framer (4d43e7b)\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addFonts,addPropertyControls,ControlType,cx,RichText,useComponentViewport,useLocaleInfo,useVariantState,withCSS,withFX}from\"framer\";import{LayoutGroup,motion,MotionConfigContext}from\"framer-motion\";import*as React from\"react\";import{useRef}from\"react\";const MotionDivWithFX=withFX(motion.div);const enabledGestures={BwrQlqeIp:{hover:true,pressed:true}};const cycleOrder=[\"BwrQlqeIp\",\"wss9GSJqs\",\"SHtInkC36\",\"RzAczuDAu\",\"yWUYcekbk\"];const serializationHash=\"framer-qdlWG\";const variantClassNames={BwrQlqeIp:\"framer-v-7ue2e8\",RzAczuDAu:\"framer-v-1s4u315\",SHtInkC36:\"framer-v-8lnw07\",wss9GSJqs:\"framer-v-rshhq5\",yWUYcekbk:\"framer-v-tid6ak\"};function addPropertyOverrides(overrides,...variants){const nextOverrides={};variants?.forEach(variant=>variant&&Object.assign(nextOverrides,overrides[variant]));return nextOverrides;}const transition1={delay:0,duration:.2,ease:[.44,0,.56,1],type:\"tween\"};const transition2={delay:0,duration:1,ease:[0,0,1,1],type:\"tween\"};const animation={opacity:1,rotate:360,rotateX:0,rotateY:0,scale:1,skewX:0,skewY:0,x:0,y:0};const transformTemplate1=(_,t)=>`translateX(-50%) ${t}`;const Transition=({value,children})=>{const config=React.useContext(MotionConfigContext);const transition=value??config.transition;const contextValue=React.useMemo(()=>({...config,transition}),[JSON.stringify(transition)]);return /*#__PURE__*/_jsx(MotionConfigContext.Provider,{value:contextValue,children:children});};const humanReadableVariantMap={Default:\"BwrQlqeIp\",Disabled:\"SHtInkC36\",Error:\"yWUYcekbk\",Loading:\"wss9GSJqs\",Success:\"RzAczuDAu\"};const Variants=motion.create(React.Fragment);const getProps=({height,id,width,...props})=>{return{...props,variant:humanReadableVariantMap[props.variant]??props.variant??\"BwrQlqeIp\"};};const createLayoutDependency=(props,variants)=>{if(props.layoutDependency)return variants.join(\"-\")+props.layoutDependency;return variants.join(\"-\");};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const fallbackRef=useRef(null);const refBinding=ref??fallbackRef;const defaultLayoutId=React.useId();const{activeLocale,setLocale}=useLocaleInfo();const componentViewport=useComponentViewport();const{style,className,layoutId,variant,...restProps}=getProps(props);const{baseVariant,classNames,clearLoadingGesture,gestureHandlers,gestureVariant,isLoading,setGestureState,setVariant,variants}=useVariantState({cycleOrder,defaultVariant:\"BwrQlqeIp\",enabledGestures,ref:refBinding,variant,variantClassNames});const layoutDependency=createLayoutDependency(props,variants);const sharedStyleClassNames=[];const scopingClassNames=cx(serializationHash,...sharedStyleClassNames);const isDisplayed=()=>{if(baseVariant===\"wss9GSJqs\")return false;return true;};const isDisplayed1=()=>{if(baseVariant===\"wss9GSJqs\")return true;return false;};return /*#__PURE__*/_jsx(LayoutGroup,{id:layoutId??defaultLayoutId,children:/*#__PURE__*/_jsx(Variants,{animate:variants,initial:false,children:/*#__PURE__*/_jsx(Transition,{value:transition1,children:/*#__PURE__*/_jsxs(motion.button,{...restProps,...gestureHandlers,className:cx(scopingClassNames,\"framer-7ue2e8\",className,classNames),\"data-framer-name\":\"Default\",\"data-reset\":\"button\",layoutDependency:layoutDependency,layoutId:\"BwrQlqeIp\",ref:refBinding,style:{backgroundColor:\"rgb(8, 136, 169)\",borderBottomLeftRadius:10,borderBottomRightRadius:10,borderTopLeftRadius:10,borderTopRightRadius:10,opacity:1,...style},variants:{\"BwrQlqeIp-hover\":{backgroundColor:\"rgb(24, 30, 66)\",opacity:1},\"BwrQlqeIp-pressed\":{backgroundColor:\"rgb(174, 74, 39)\",opacity:1},RzAczuDAu:{opacity:1},SHtInkC36:{opacity:.5},yWUYcekbk:{backgroundColor:\"rgba(255, 34, 68, 0.15)\",opacity:1}},...addPropertyOverrides({\"BwrQlqeIp-hover\":{\"data-framer-name\":undefined},\"BwrQlqeIp-pressed\":{\"data-framer-name\":undefined},RzAczuDAu:{\"data-framer-name\":\"Success\"},SHtInkC36:{\"data-framer-name\":\"Disabled\"},wss9GSJqs:{\"data-framer-name\":\"Loading\"},yWUYcekbk:{\"data-framer-name\":\"Error\"}},baseVariant,gestureVariant),children:[isDisplayed()&&/*#__PURE__*/_jsx(RichText,{__fromCanvasComponent:true,children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{dir:\"auto\",style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"Envoyer\"})}),className:\"framer-g3zsx8\",fonts:[\"Inter-SemiBold\"],layoutDependency:layoutDependency,layoutId:\"PybFLgkEz\",style:{\"--extracted-r6o4lv\":\"rgb(255, 255, 255)\",\"--framer-link-text-color\":\"rgb(0, 153, 255)\",\"--framer-link-text-decoration\":\"underline\"},variants:{yWUYcekbk:{\"--extracted-r6o4lv\":\"rgb(255, 34, 68)\"}},verticalAlignment:\"top\",withExternalLayout:true,...addPropertyOverrides({RzAczuDAu:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-family\":'\"Inter\", \"Inter Placeholder\", sans-serif',\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 255, 255))\"},children:\"Merci pour votre inscription !\"})})},yWUYcekbk:{children:/*#__PURE__*/_jsx(React.Fragment,{children:/*#__PURE__*/_jsx(motion.p,{style:{\"--font-selector\":\"SW50ZXItU2VtaUJvbGQ=\",\"--framer-font-family\":'\"Inter\", \"Inter Placeholder\", sans-serif',\"--framer-font-size\":\"14px\",\"--framer-font-weight\":\"600\",\"--framer-text-color\":\"var(--extracted-r6o4lv, rgb(255, 34, 68))\"},children:\"Something went wrong\"})})}},baseVariant,gestureVariant)}),isDisplayed1()&&/*#__PURE__*/_jsx(motion.div,{className:\"framer-hfek79\",\"data-framer-name\":\"Spinner\",layoutDependency:layoutDependency,layoutId:\"W6saTudhR\",style:{mask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\",WebkitMask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\"},children:/*#__PURE__*/_jsx(MotionDivWithFX,{__framer__loop:animation,__framer__loopEffectEnabled:true,__framer__loopRepeatDelay:0,__framer__loopRepeatType:\"loop\",__framer__loopTransition:transition2,__perspectiveFX:false,__smartComponentFX:true,__targetOpacity:1,className:\"framer-1h9cxuq\",\"data-framer-name\":\"Conic\",layoutDependency:layoutDependency,layoutId:\"Yp3uSyLik\",style:{background:\"conic-gradient(from 180deg at 50% 50%, rgb(68, 204, 255) 0deg, rgb(68, 204, 255) 360deg)\",backgroundColor:\"rgb(68, 204, 255)\",mask:\"none\",WebkitMask:\"none\"},variants:{wss9GSJqs:{background:\"conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0) 7.208614864864882deg, rgb(255, 255, 255) 342deg)\",backgroundColor:\"rgba(0, 0, 0, 0)\",mask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\",WebkitMask:\"url('https://framerusercontent.com/images/pGiXYozQ3mE4cilNOItfe2L2fUA.svg?width=20&height=20') alpha no-repeat center / cover add\"}},children:/*#__PURE__*/_jsx(motion.div,{className:\"framer-xw5aab\",\"data-framer-name\":\"Rounding\",layoutDependency:layoutDependency,layoutId:\"C7zph9Vvu\",style:{backgroundColor:\"rgb(255, 255, 255)\",borderBottomLeftRadius:1,borderBottomRightRadius:1,borderTopLeftRadius:1,borderTopRightRadius:1},transformTemplate:transformTemplate1})})})]})})})});});const css=[\".framer-qdlWG.framer-1aelvm5, .framer-qdlWG .framer-1aelvm5 { display: block; }\",\".framer-qdlWG.framer-7ue2e8 { align-content: center; align-items: center; cursor: pointer; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 0px; height: 40px; justify-content: center; overflow: visible; padding: 0px; position: relative; width: 240px; }\",\".framer-qdlWG .framer-g3zsx8 { -webkit-user-select: none; flex: none; height: auto; position: relative; user-select: none; white-space: pre; width: auto; }\",\".framer-qdlWG .framer-hfek79 { aspect-ratio: 1 / 1; flex: none; gap: 10px; height: auto; overflow: hidden; position: relative; width: 20px; }\",\".framer-qdlWG .framer-1h9cxuq { bottom: 0px; flex: none; left: 0px; overflow: visible; position: absolute; right: 0px; top: 0px; }\",\".framer-qdlWG .framer-xw5aab { aspect-ratio: 1 / 1; flex: none; height: auto; left: 50%; overflow: visible; position: absolute; top: 0px; width: 2px; }\",\".framer-qdlWG.framer-v-rshhq5.framer-7ue2e8, .framer-qdlWG.framer-v-8lnw07.framer-7ue2e8, .framer-qdlWG.framer-v-1s4u315.framer-7ue2e8, .framer-qdlWG.framer-v-tid6ak.framer-7ue2e8 { cursor: unset; }\",\".framer-qdlWG.framer-v-rshhq5 .framer-1h9cxuq { overflow: hidden; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicHeight 40\n * @framerIntrinsicWidth 240\n * @framerCanvasComponentVariantDetails {\"propertyName\":\"variant\",\"data\":{\"default\":{\"layout\":[\"fixed\",\"fixed\"]},\"wss9GSJqs\":{\"layout\":[\"fixed\",\"fixed\"]},\"SHtInkC36\":{\"layout\":[\"fixed\",\"fixed\"]},\"RzAczuDAu\":{\"layout\":[\"fixed\",\"fixed\"]},\"yWUYcekbk\":{\"layout\":[\"fixed\",\"fixed\"]},\"MEG2z4GfH\":{\"layout\":[\"fixed\",\"fixed\"]},\"oyMYDYg1X\":{\"layout\":[\"fixed\",\"fixed\"]}}}\n * @framerImmutableVariables true\n * @framerDisplayContentsDiv false\n * @framerAutoSizeImages true\n * @framerComponentViewportWidth true\n * @framerColorSyntax true\n */const Framerf4qVu0GsN=withCSS(Component,css,\"framer-qdlWG\");export default Framerf4qVu0GsN;Framerf4qVu0GsN.displayName=\"Button 2\";Framerf4qVu0GsN.defaultProps={height:40,width:240};addPropertyControls(Framerf4qVu0GsN,{variant:{options:[\"BwrQlqeIp\",\"wss9GSJqs\",\"SHtInkC36\",\"RzAczuDAu\",\"yWUYcekbk\"],optionTitles:[\"Default\",\"Loading\",\"Disabled\",\"Success\",\"Error\"],title:\"Variant\",type:ControlType.Enum}});addFonts(Framerf4qVu0GsN,[{explicitInter:true,fonts:[{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F\",url:\"https://framerusercontent.com/assets/hyOgCu0Xnghbimh0pE8QTvtt2AU.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116\",url:\"https://framerusercontent.com/assets/NeGmSOXrPBfEFIy5YZeHq17LEDA.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+1F00-1FFF\",url:\"https://framerusercontent.com/assets/oYaAX5himiTPYuN8vLWnqBbfD2s.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0370-03FF\",url:\"https://framerusercontent.com/assets/lEJLP4R0yuCaMCjSXYHtJw72M.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF\",url:\"https://framerusercontent.com/assets/cRJyLNuTJR5jbyKzGi33wU9cqIQ.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2070, U+2074-207E, U+2080-208E, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD\",url:\"https://framerusercontent.com/assets/yDtI2UI8XcEg1W2je9XPN3Noo.woff2\",weight:\"600\"},{cssFamilyName:\"Inter\",source:\"framer\",style:\"normal\",uiFamilyName:\"Inter\",unicodeRange:\"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB\",url:\"https://framerusercontent.com/assets/A0Wcc7NgXMjUuFdquHDrIZpzZw0.woff2\",weight:\"600\"}]}],{supportsExplicitInterCodegen:true});\nexport const __FramerMetadata__ = {\"exports\":{\"Props\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"reactComponent\",\"name\":\"Framerf4qVu0GsN\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"40\",\"framerColorSyntax\":\"true\",\"framerAutoSizeImages\":\"true\",\"framerComponentViewportWidth\":\"true\",\"framerImmutableVariables\":\"true\",\"framerContractVersion\":\"1\",\"framerCanvasComponentVariantDetails\":\"{\\\"propertyName\\\":\\\"variant\\\",\\\"data\\\":{\\\"default\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"wss9GSJqs\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"SHtInkC36\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"RzAczuDAu\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"yWUYcekbk\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"MEG2z4GfH\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]},\\\"oyMYDYg1X\\\":{\\\"layout\\\":[\\\"fixed\\\",\\\"fixed\\\"]}}}\",\"framerDisplayContentsDiv\":\"false\",\"framerIntrinsicWidth\":\"240\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./f4qVu0GsN.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";// ============================================================================\n// Lead form submission for forma-finance.fr. Posts directly to the same\n// Google Form's \"formResponse\" endpoint used by every other Framer site\n// sending leads into the centralized Google Sheet (competencesfirst.fr,\n// avance-langues.fr, ...). Google Forms don't return CORS headers, so the\n// request uses `mode: \"no-cors\"` and the response is opaque — we can't read\n// its real status, we only know whether the network request itself\n// succeeded.\n// ============================================================================\nconst GOOGLE_FORM_ACTION=\"https://docs.google.com/forms/d/e/1FAIpQLSemnsEyoEqMNew5nPkGANfCT_hcGlUdRfXVEmhDZcCd5rKCIg/formResponse\";// Maps our internal field names to the Google Form's entry IDs — same IDs\n// as every other site's LeadForm.tsx, since it's the same shared Form.\nconst FIELD_MAP={prenom:\"entry.2137408060\",email:\"entry.940745950\",telephone:\"entry.34079320\",formation_souhaitee:\"entry.1041634778\",consentement_telephone:\"entry.2143672737\"};// The Google Form is shared across every site and centralizes leads into\n// one Google Sheet, but it has no field of its own to record which site a\n// lead came from. To keep leads distinguishable in the shared Sheet,\n// `submitLead` below prefixes the submitted \"formation_souhaitee\" value\n// with the site name, e.g. \"Forma Finance — Intégrer l'IA conversationnelle\n// dans le cycle de vente\".\nconst SITE_NAME=\"Forma Finance\";// Forma Finance has 3 live formations as of 2026-09-07. Each training page\n// now has a real \"Formation souhaitée\" <select> (name=\"formation_souhaitee\",\n// options' values already set to the full readable formation name), so the\n// submitted FormData value is used directly and is whatever the visitor\n// actually picked — not necessarily the page's own formation. This map is\n// kept only as a fallback for pages without that select, e.g. /contact,\n// which reuses this same form but currently has no dropdown of its own.\nconst FORMATION_NAMES_BY_PATH={\"/ia-conversationnelle-vente\":\"Int\\xe9grer l'intelligence artificielle conversationnelle dans le cycle de vente\",\"/ia-marketing-de-contenus\":\"D\\xe9velopper son activit\\xe9 professionnelle avec l'intelligence artificielle dans son marketing de contenus\",\"/ia-reseaux-sociaux\":\"D\\xe9velopper l'activit\\xe9 commerciale par les r\\xe9seaux sociaux\"};const DEFAULT_FORMATION_NAME=FORMATION_NAMES_BY_PATH[\"/ia-conversationnelle-vente\"];function getFormationName(pathname){return FORMATION_NAMES_BY_PATH[pathname]??DEFAULT_FORMATION_NAME;}// The only real, verified contact address for Forma Finance (see the\n// footer and project notes) — never invent a plausible-looking address.\nexport const CONSENT_TEXT=\"J’accepte d’\\xeatre recontact\\xe9(e) par t\\xe9l\\xe9phone par Forma Finance au sujet de cette formation. Consentement valable 1 an, r\\xe9vocable \\xe0 tout moment via contact@forma-finance.fr.\";/**\n * Sends the lead payload directly to the Google Form's \"formResponse\"\n * endpoint as an `application/x-www-form-urlencoded` POST, mapping each\n * field through `FIELD_MAP`. `page` and `consentement_texte` are not part\n * of the Google Form (it only has 5 questions) and are therefore never\n * sent — they remain available on `data` for console logging only. `site`\n * is likewise not sent as its own field, but — since the shared Form has\n * no dedicated \"Site\" question — is prefixed onto the submitted\n * `formation_souhaitee` value so leads stay distinguishable by origin in\n * the centralized Google Sheet.\n *\n * The request uses `mode: \"no-cors\"` because Google Forms doesn't return\n * CORS headers; the response is opaque so we can't read its real status —\n * we treat a fetch that doesn't throw a network error as a success.\n */export async function submitLead(data){const body=new URLSearchParams;body.append(FIELD_MAP.prenom,data.prenom||\"\");body.append(FIELD_MAP.email,data.email||\"\");body.append(FIELD_MAP.telephone,data.telephone||\"\");body.append(FIELD_MAP.formation_souhaitee,(data.site?`${data.site} — `:\"\")+(data.formation_souhaitee||\"\"));if(data.consentement_telephone){body.append(FIELD_MAP.consentement_telephone,\"Option 1\");}try{await fetch(GOOGLE_FORM_ACTION,{method:\"POST\",mode:\"no-cors\",headers:{\"Content-Type\":\"application/x-www-form-urlencoded\"},body:body.toString()});return{ok:true};}catch(err){return{ok:false,error:err instanceof Error?err.message:\"Impossible de contacter le serveur.\"};}}// ----------------------------------------------------------------------------\n// Feedback is shown entirely via the status message text below the form\n// (see `setStatusMessage`) plus disabling the form's pointer events while\n// pending — no code override on the submit button itself, no cross-override\n// state sharing. Simpler than competencesfirst.fr/avance-langues.fr's\n// LeadForm.tsx (which additionally swaps the button's Loading/Success/Error\n// visual variant via a shared store), on purpose: pull in that pattern here\n// too if the button should visually react to submission state.\n// ----------------------------------------------------------------------------\nconst MESSAGE_ELEMENT_ID=\"lead-form-message\";function setStatusMessage(formEl,message,tone){const messageEl=formEl?.querySelector(`#${MESSAGE_ELEMENT_ID}`)??(typeof document!==\"undefined\"?document.getElementById(MESSAGE_ELEMENT_ID):null);if(!messageEl)return;messageEl.textContent=message;messageEl.style.display=message?\"block\":\"none\";messageEl.style.color=tone===\"error\"?\"rgb(200, 40, 40)\":tone===\"success\"?\"rgb(20, 140, 90)\":\"rgb(136, 136, 136)\";}/**\n * Code Override for the registration form's `<form>` element (FrameNode\n * with htmlTag=\"form\"). Intercepts the native submit, validates the\n * consent checkbox, calls `submitLead`, and shows Pending / Success / Error\n * feedback via the `#lead-form-message` text node and the form's own\n * pointer-events (see the module doc comment above for why there is no\n * separate button-state override).\n */export function withLeadFormSubmit(Component){return props=>{const formRef=useRef(null);useEffect(()=>{// Start clean: hide any status message left over from a previous\n// canvas edit/preview session.\nsetStatusMessage(formRef.current,\"\",\"neutral\");},[]);function handleSubmit(event){event.preventDefault();const form=event.currentTarget;formRef.current=form;// Native constraint validation covers the required text fields\n// and the required consent checkbox, showing the browser's own\n// inline messaging when something is missing.\nif(!form.reportValidity())return;const consentInput=form.elements.namedItem(\"consentement\");const consentChecked=!!consentInput?.checked;if(!consentChecked){setStatusMessage(form,\"Merci de cocher la case de consentement pour envoyer votre demande.\",\"error\");return;}const formData=new FormData(form);const payload={site:SITE_NAME,page:typeof window!==\"undefined\"?window.location.pathname:\"/\",prenom:String(formData.get(\"prenom\")??\"\"),email:String(formData.get(\"email\")??\"\"),telephone:String(formData.get(\"telephone\")??\"\"),formation_souhaitee:String(formData.get(\"formation_souhaitee\")??\"\").trim()||getFormationName(typeof window!==\"undefined\"?window.location.pathname:\"/\"),consentement_telephone:consentChecked,consentement_texte:CONSENT_TEXT};form.style.pointerEvents=\"none\";setStatusMessage(form,\"Envoi en cours…\",\"neutral\");submitLead(payload).then(result=>{form.style.pointerEvents=\"\";if(result.ok){setStatusMessage(form,\"Votre demande a bien \\xe9t\\xe9 envoy\\xe9e. Un conseiller va vous recontacter.\",\"success\");form.reset();}else{setStatusMessage(form,\"Une erreur est survenue lors de l'envoi. Merci de r\\xe9essayer ou de nous contacter directement.\",\"error\");}});}return /*#__PURE__*/_jsx(Component,{...props,onSubmit:handleSubmit,ref:node=>{formRef.current=node;}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"submitLead\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"SubmitResult\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CONSENT_TEXT\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"LeadPayload\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLeadFormSubmit\":{\"type\":\"reactHoc\",\"name\":\"withLeadFormSubmit\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=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