{"version":3,"file":"FormCollectivites.DCSCWRac.mjs","names":["fonts","css","className","css","useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/8AD3FTXMR5L4qXfO5sJs/4rNuqpuNryPjtrH4cJXa/qwRFsEQLh.js","https:/framerusercontent.com/modules/tFW44d9jUS58thUqdXpK/n5ksu5MFtVQ933PMYzjE/vLHPZqtBC.js","https:/framerusercontent.com/modules/7WKJOhuq9SD1E5DWuWfn/7ix470TwSobM6rgKl5sf/FormCollectivites.js"],"sourcesContent":["// Generated by Framer (98b71dc)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOM;PP Agrandir Narrow Medium\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"PP Agrandir Narrow Medium\",source:\"custom\",uiFamilyName:\"PP Agrandir Narrow Medium\",url:\"https://framerusercontent.com/assets/yCJHVuOsrtq9xy9ySJ4z9Wano.otf\"}]}];export const css=['.framer-Oc00J .framer-styles-preset-1cwpji7:not(.rich-text-wrapper), .framer-Oc00J .framer-styles-preset-1cwpji7.rich-text-wrapper h4 { --framer-font-family: \"PP Agrandir Narrow Medium\", \"PP Agrandir Narrow Medium Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 32px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: -0.01em; --framer-line-height: 1.1em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; }','@media (max-width: 1439px) and (min-width: 810px) { .framer-Oc00J .framer-styles-preset-1cwpji7:not(.rich-text-wrapper), .framer-Oc00J .framer-styles-preset-1cwpji7.rich-text-wrapper h4 { --framer-font-family: \"PP Agrandir Narrow Medium\", \"PP Agrandir Narrow Medium Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 24px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: -0.01em; --framer-line-height: 1.1em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }','@media (max-width: 809px) and (min-width: 0px) { .framer-Oc00J .framer-styles-preset-1cwpji7:not(.rich-text-wrapper), .framer-Oc00J .framer-styles-preset-1cwpji7.rich-text-wrapper h4 { --framer-font-family: \"PP Agrandir Narrow Medium\", \"PP Agrandir Narrow Medium Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 24px; --framer-font-style: normal; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-letter-spacing: -0.01em; --framer-line-height: 1.1em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; } }'];export const className=\"framer-Oc00J\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","// Generated by Framer (f08ca78)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"CUSTOMV2;PP Agrandir Tight Black\",\"CUSTOMV2;PP Agrandir Tight Black\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"PP Agrandir Tight Black\",source:\"custom\",style:\"normal\",uiFamilyName:\"PP Agrandir\",url:\"https://framerusercontent.com/assets/epC6xeDprWbilNvhH6TifOnaU8.otf\",weight:\"900\"}]}];export const css=[\".framer-6DJtE .framer-styles-preset-yq0869:not(.rich-text-wrapper), .framer-6DJtE .framer-styles-preset-yq0869.rich-text-wrapper h4 { --framer-font-family: \\\"PP Agrandir Tight Black\\\", sans-serif; --framer-font-family-bold: \\\"PP Agrandir Tight Black\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv09' on, 'cv03' on, 'cv04' on, 'cv11' on, 'ss08' on; --framer-font-size: 20px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 900; --framer-font-weight-bold: 900; --framer-letter-spacing: 0em; --framer-line-height: 1em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: uppercase; }\",\"@media (max-width: 1439px) and (min-width: 810px) { .framer-6DJtE .framer-styles-preset-yq0869:not(.rich-text-wrapper), .framer-6DJtE .framer-styles-preset-yq0869.rich-text-wrapper h4 { --framer-font-family: \\\"PP Agrandir Tight Black\\\", sans-serif; --framer-font-family-bold: \\\"PP Agrandir Tight Black\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv09' on, 'cv03' on, 'cv04' on, 'cv11' on, 'ss08' on; --framer-font-size: 16px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 900; --framer-font-weight-bold: 900; --framer-letter-spacing: 0em; --framer-line-height: 1em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: uppercase; } }\",\"@media (max-width: 809px) and (min-width: 0px) { .framer-6DJtE .framer-styles-preset-yq0869:not(.rich-text-wrapper), .framer-6DJtE .framer-styles-preset-yq0869.rich-text-wrapper h4 { --framer-font-family: \\\"PP Agrandir Tight Black\\\", sans-serif; --framer-font-family-bold: \\\"PP Agrandir Tight Black\\\", sans-serif; --framer-font-open-type-features: 'blwf' on, 'cv09' on, 'cv03' on, 'cv04' on, 'cv11' on, 'ss08' on; --framer-font-size: 18px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-variation-axes: normal; --framer-font-weight: 900; --framer-font-weight-bold: 900; --framer-letter-spacing: 0em; --framer-line-height: 1em; --framer-paragraph-spacing: 40px; --framer-text-alignment: start; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: uppercase; } }\"];export const className=\"framer-6DJtE\";\nexport const __FramerMetadata__ = {\"exports\":{\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";import AppButton from\"https://framer.com/m/AppButton-Qe85.js@F6ghmcmqoafdl2d6RrPB\";import AppInput from\"https://framer.com/m/AppInput-Swpv.js@RstoLthoxt7m28JqI2ut\";import AppTextarea from\"https://framer.com/m/AppTextarea-oPYZ.js@5gGLNqp29sXKtFCcTF7h\";export default function FormProContact({isLarge,children}){const formInitialState={firstname:\"\",lastname:\"\",email:\"\",phoneNumber:\"\",city:\"\",organization:\"\",job:\"\",message:\"\"};const[form,setForm]=useState(formInitialState);const[isSubmitting,setIsSubmitting]=useState(false);const[isSubmitSuccess,setIsSubmitSuccess]=useState(false);const[error,setError]=useState(\"\");const[isPrivacyPolicyChecked,setIsPrivacyPolicyChecked]=useState(false);async function onSubmit(e){e.preventDefault();setIsSubmitting(true);//console.log(window.grecaptcha)\n//window.grecaptcha?.enterprise.ready(async () => {\n//console.log(\"ready\")\ntry{setIsSubmitSuccess(false);if(window.dataLayer){window.dataLayer.push({event:\"envoi_formulaire_collectivite\",Nom:form.lastname,Prenom:form.firstname,Mail:form.email,Telephone:form.phoneNumber,Ville:form.city,Organisation:form.organization,Fonction:form.job});}const formData=new FormData;// Build FormData\nObject.entries(form).forEach(([key,value])=>{if(value){formData.append(key,value);}});const urlSearchParams=new URLSearchParams(window.location.search);const queryParams=Object.fromEntries(urlSearchParams.entries());if(Object.keys(queryParams).length>0){formData.append(\"pageQueryParams\",JSON.stringify(queryParams));}const response=await fetch(\"https://contact.dailyn.app/contact/collectivity\",{method:\"POST\",body:formData});const data=await response.json();if(data&&data.data&&data.data.error){throw new Error(data.data.error.message);}setIsSubmitSuccess(true);setForm(formInitialState);}catch(err){if(typeof err===\"object\"&&err.message){setError(err.message);}else{setError(\"Nous n'avons pas pu enregistrer votre demande. Merci de r\\xe9essayer.\");}}finally{setIsSubmitting(false);}//})\n}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{type:\"text/css\",children:css}),/*#__PURE__*/_jsx(\"script\",{src:\"https://www.google.com/recaptcha/enterprise.js?render=6LdZSGQqAAAAAP7uT0CIzoeHMs3CqPWXfYjEyNOc\"}),/*#__PURE__*/_jsxs(\"form\",{className:\"form\",onSubmit:onSubmit,style:{...containerStyle,gridTemplateColumns:isLarge?\"repeat(2, minmax(0, 1fr))\":\"repeat(1, minmax(0, 1fr))\"},children:[/*#__PURE__*/_jsx(AppInput,{id:\"lastname\",label:\"Nom\",placeholder:\"Votre nom\",isRequired:true,value:form.lastname,onChange:e=>setForm({...form,lastname:e.target.value})}),/*#__PURE__*/_jsx(AppInput,{id:\"firstname\",label:\"Pr\\xe9nom\",placeholder:\"Votre pr\\xe9nom\",isRequired:true,value:form.firstname,onChange:e=>setForm({...form,firstname:e.target.value})}),/*#__PURE__*/_jsx(AppInput,{id:\"email\",label:\"Mail\",placeholder:\"Votre adresse mail\",isRequired:true,value:form.email,type:\"email\",onChange:e=>setForm({...form,email:e.target.value})}),/*#__PURE__*/_jsx(AppInput,{id:\"phone\",type:\"tel\",label:\"T\\xe9l\\xe9phone\",isRequired:false,value:form.phoneNumber,placeholder:\"Votre n\\xb0 de t\\xe9l\\xe9phone\",onChange:e=>setForm({...form,phoneNumber:e.target.value})}),/*#__PURE__*/_jsx(AppInput,{id:\"city\",label:\"Votre ville\",placeholder:\"O\\xf9 \\xeates-vous bas\\xe9\",isRequired:true,value:form.city,onChange:e=>setForm({...form,city:e.target.value})}),/*#__PURE__*/_jsx(AppInput,{id:\"organization\",label:\"Organisation\",placeholder:\"Votre type d'organisation\",isRequired:true,value:form.organization,onChange:e=>setForm({...form,organization:e.target.value})}),/*#__PURE__*/_jsx(AppInput,{id:\"job\",label:\"Fonction\",placeholder:\"Votre fonction\",isRequired:false,value:form.job,onChange:e=>setForm({...form,job:e.target.value})}),/*#__PURE__*/_jsx(AppTextarea,{id:\"message\",label:\"Message\",isRequired:false,placeholder:\"Votre message...\",value:form.message,style:{gridColumn:isLarge?\"span 2 / span 2\":undefined},onChange:e=>setForm({...form,message:e.target.value})}),/*#__PURE__*/_jsx(AppButton,{label:\"Envoyer\",isSubmit:true,isLoading:isSubmitting,style:{fontFamily:\"PP Agrandir Narrow Bold\",gridColumn:isLarge?\"span 2 / span 2\":undefined}}),error&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"16px\",color:\"#FA1F08\",fontWeight:\"700\",gridColumn:isLarge?\"span 2 / span 2\":undefined},children:error}),isSubmitSuccess&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"16px\",color:\"#9F34FB\",fontWeight:\"700\",gridColumn:isLarge?\"span 2 / span 2\":undefined},children:\"Merci de votre inter\\xeat pour Dailyn, nous vous recontacterons prochainement !\"})]})]});}// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={display:\"grid\",gap:\"32px\"};addPropertyControls(FormProContact,{isLarge:{type:ControlType.Boolean,title:\"2 Columns\",description:\"2 by default\",defaultValue:true}});const css=`\n.grecaptcha-badge {\n    visibility: hidden;\n}\n.form input:focus, .form textarea:focus, .form button:focus {\n       outline-color: #A439FF;\n}\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":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