module.exports=[35112,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactDOM},34265,a=>{a.v({className:"aboreto_325698a1-module___yYqBa__className"})},32812,a=>{a.v({className:"jura_1c304f6-module__CY68tq__className"})},71551,a=>{"use strict";var b=a.i(87924),c=a.i(15925),d=a.i(72131),e=a.i(34265);let f={className:e.default.className,style:{fontFamily:"'Aboreto', 'Aboreto Fallback'",fontWeight:400,fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(32812);let h={className:g.default.className,style:{fontFamily:"'Jura', 'Jura Fallback'",fontStyle:"normal"}};null!=g.default.variable&&(h.variable=g.default.variable),a.s(["default",0,()=>{let a=(0,c.useTranslations)("Contact"),[e,g]=(0,d.useState)({enterpriseName:"",names:"",email:"",phone:"",message:""}),i=a=>{let{name:b,value:c}=a.target;g(a=>({...a,[b]:c}))},j=async a=>{a.preventDefault();try{let a=await fetch("/api/contacto",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),b=await a.json();if(a.ok)alert("✅ Mensaje enviado con éxito"),g({enterpriseName:"",names:"",email:"",phone:"",message:""});else{let a=b.details?`❌ Error: ${b.details.message}
C\xf3digo: ${b.details.code||"N/A"}
Respuesta: ${b.details.response||"N/A"}`:`❌ Error: ${b.error}`;alert(a),console.error("Error completo:",b)}}catch(a){alert("❌ Error de red al enviar el mensaje"),console.error("Error de red:",a)}};return(0,b.jsx)("div",{className:"py-6 sm:px-4 sm:py-10 sm:pl-14 text-[#292929] px-15",children:(0,b.jsxs)("form",{onSubmit:j,className:"bg-white rounded-lg w-full max-w-md mx-auto sm:mx-0",children:[(0,b.jsx)("div",{className:`${f.className}`,children:(0,b.jsx)("h2",{className:"text-lg text-center sm:text-x2 sm:text-left pb-6 font-semibold",children:a("form")})}),(0,b.jsxs)("div",{className:"mb-3 sm:mb-0",children:[(0,b.jsx)("label",{className:`block text-xs sm:text-lg mb-1 sm:mb-0 font-bold ${h.className}`,children:a("enterpriseName")}),(0,b.jsx)("input",{name:"enterpriseName",value:e.enterpriseName,type:"text",className:"w-full px-2 border rounded focus:ring-blue-500 my-2",placeholder:a("enterpriseName"),onChange:i,required:!0})]}),(0,b.jsxs)("div",{className:"mb-3 sm:mb-0",children:[(0,b.jsx)("label",{className:`block text-xs sm:text-lg mb-1 sm:mb-0 font-bold ${h.className}`,children:a("names")}),(0,b.jsx)("input",{name:"names",value:e.names,type:"text",className:"w-full px-2 border rounded focus:ring-blue-500 my-2",placeholder:a("names"),onChange:i,required:!0})]}),(0,b.jsxs)("div",{className:"mb-3 sm:mb-0",children:[(0,b.jsx)("label",{className:`block text-xs sm:text-lg mb-1 sm:mb-0 font-bold ${h.className}`,children:a("email")}),(0,b.jsx)("input",{name:"email",value:e.email,type:"email",className:"w-full px-2 border rounded focus:ring-blue-500 my-2",placeholder:a("email"),onChange:i,required:!0})]}),(0,b.jsxs)("div",{className:"mb-3 sm:mb-0",children:[(0,b.jsx)("label",{className:`block text-xs sm:text-lg mb-1 sm:mb-0 font-bold ${h.className}`,children:a("phone")}),(0,b.jsx)("input",{name:"phone",value:e.phone,type:"tel",className:"w-full px-2 border rounded focus:ring-blue-500 my-2",placeholder:a("phone"),onChange:i,required:!0})]}),(0,b.jsxs)("div",{className:"mb-3 sm:mb-0",children:[(0,b.jsx)("label",{className:`block text-xs sm:text-lg mb-1 sm:mb-0 font-bold ${h.className}`,children:a("message")}),(0,b.jsx)("textarea",{name:"message",value:e.message,className:"w-full px-2 border rounded focus:ring-blue-500 my-2 resize-none leading-6",placeholder:a("message"),rows:1,onChange:i})]}),(0,b.jsx)("button",{type:"submit",className:`w-auto bg-[#FF8112] text-white py-1 px-4 rounded font-bold hover:bg-[#FF8112]/50 transition ${h.className}`,children:a("button")}),(0,b.jsx)("div",{className:`pt-2 pb-20 text-xs sm:text-sm font-bold ${h.className}`,children:a("simpleText")})]})})}],71551)}];

//# sourceMappingURL=%5Broot-of-the-server%5D__6b329909._.js.map