{"version":3,"file":"Telephone.BHalDZ8W.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/k4TzzxaTX24lbot3kBrB/u4Kr1v7WGEkQMbE8Q6dR/Telephone.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useState}from\"react\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n */ export default function TelephoneInput(props){const[phone,setPhone]=useState(null);const[submitted,setSubmitted]=useState(false);const handlePhoneChange=e=>{setPhone(e.target.value);};const handleSubmit=()=>{// Construct the data object to send to the backend API\nconst data={phoneNumber:phone,source:\"landing::callme\"};// Send data to the backend API using fetch or axios\nfetch(\"https://api.staging.jointango.fr/public/interest\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(data)}).then(response=>{setSubmitted(true);}).catch(error=>{// Handle errors here\nconsole.error(\"Error:\",error);});};return /*#__PURE__*/ _jsx(\"div\",{style:containerStyle,children:submitted?/*#__PURE__*/ _jsx(_Fragment,{children:/*#__PURE__*/ _jsx(\"input\",{id:\"submitted\",type:\"text\",disabled:true,value:\"Nous vous rappelons tr\\xe8s bient\\xf4t !\",style:{...inputStyle,width:\"100%\",marginRight:8,fontSize:14}})}):/*#__PURE__*/ _jsxs(_Fragment,{children:[/*#__PURE__*/ _jsx(\"input\",{type:\"text\",id:\"telephone\",placeholder:\"NUM\\xc9RO DE T\\xc9L\\xc9PHONE\",style:{...inputStyle,width:\"60%\",marginRight:8,fontSize:14},value:phone,onChange:handlePhoneChange}),/*#__PURE__*/ _jsx(\"button\",{onClick:handleSubmit,style:{...inputStyle,color:\"white\",backgroundColor:\"black\",fontWeight:\"600\",fontSize:16,cursor:\"pointer\",opacity:1,width:\"40%\",marginLeft:8},children:\"\\xcatre rappel\\xe9.e\"}),/*#__PURE__*/ _jsx(\"style\",{children:` \n                    ::placeholder { \n                        color: black; \n                    }\n                    `})]})});};// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"100%\",// width: \"100%\",\ndisplay:\"flex\",justifyContent:\"center\",alignItems:\"start\",overflow:\"hidden\"};const inputStyle={width:\"100%\",backgroundColor:\"white\",height:40,borderRadius:20,borderWidth:0,paddingLeft:20,paddingRight:20,fontSize:16,fontFamily:\"DM Sans\",fontStyle:\"black\",fontWeight:\"600\",outline:\"none\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TelephoneInput\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Telephone.map"],"mappings":"yKAMI,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,KAAK,CAAM,CAAC,EAAU,GAAcA,EAAS,GAAM,CAAO,EAAkB,GAAG,CAAC,EAAS,EAAE,OAAO,MAAM,EAAS,MAAiB,CACnN,IAAM,EAAK,CAAC,YAAY,EAAM,OAAO,kBAAkB,CACvD,MAAM,mDAAmD,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,CAAC,KAAK,KAAK,UAAU,EAAK,CAAC,CAAC,CAAC,KAAK,GAAU,CAAC,EAAa,GAAK,EAAG,CAAC,MAAM,GAAO,CACnM,QAAQ,MAAM,SAAS,EAAM,EAAG,EAAG,OAAqB,EAAK,MAAM,CAAC,MAAM,EAAe,SAAS,EAAwB,EAAKC,EAAU,CAAC,SAAuB,EAAK,QAAQ,CAAC,GAAG,YAAY,KAAK,OAAO,SAAS,GAAK,MAAM,qCAA2C,MAAM,CAAC,GAAG,EAAW,MAAM,OAAO,YAAY,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAe,EAAMA,EAAU,CAAC,SAAS,CAAe,EAAK,QAAQ,CAAC,KAAK,OAAO,GAAG,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