1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[665],{20504:function(e,t,a){Promise.resolve().then(a.bind(a,52608))},52608:function(e,t,a){"use strict";a.d(t,{default:function(){return o}});var r=a(57437),s=a(2265);function o(){let[e,t]=(0,s.useState)({question:"",name:"",email:""}),[a,o]=(0,s.useState)("idle"),[n,l]=(0,s.useState)(""),i=async a=>{if(a.preventDefault(),!e.question.trim()){l("Por favor, escreva sua pergunta.");return}if(e.question.length>500){l("Sua pergunta deve ter no m\xe1ximo 500 caracteres.");return}o("submitting"),l("");try{if(!(await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw Error("Erro ao enviar pergunta");o("success"),t({question:"",name:"",email:""})}catch(e){o("error"),l("Erro ao enviar pergunta. Tente novamente.")}};return"success"===a?(0,r.jsxs)("div",{className:"max-w-2xl mx-auto text-center py-12 px-6 bg-card border border-accent-gold/50 rounded-xl",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("div",{className:"w-20 h-20 bg-accent-gold/20 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-10 w-10 text-accent-gold",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-accent-gold mb-2",children:"Pergunta Recebida!"})]}),(0,r.jsx)("p",{className:"text-gray-300 mb-6",children:"Sua pergunta foi recebida com sucesso! Vamos criar sua p\xe1gina personalizada em breve."}),(0,r.jsxs)("p",{className:"text-sm text-gray-400 mb-8",children:["Voc\xea receber\xe1 a resposta pela mesma plataforma que voc\xea enviou a pergunta, ou acompanhe em"," ",(0,r.jsx)("a",{href:"/",className:"text-accent-blue hover:underline",children:"nossa homepage"}),"."]}),(0,r.jsx)("button",{onClick:()=>o("idle"),className:"px-6 py-3 bg-accent-blue/20 text-accent-blue rounded-lg hover:bg-accent-blue/30 transition-colors",children:"Fazer Outra Pergunta"})]}):(0,r.jsxs)("form",{onSubmit:i,className:"max-w-2xl mx-auto space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"question",className:"block text-sm font-semibold text-gray-300 mb-2",children:"Sua Pergunta *"}),(0,r.jsx)("textarea",{id:"question",value:e.question,onChange:a=>t({...e,question:a.target.value}),placeholder:"Ex: Como funciona o staking de Ethereum? Quais s\xe3o os riscos?",className:"w-full px-4 py-3 bg-card border border-border rounded-lg focus:outline-none focus:border-accent-blue/50 transition-colors text-white placeholder:text-gray-500 min-h-[150px] resize-y",maxLength:500,required:!0}),(0,r.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[e.question.length,"/500 caracteres"]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"name",className:"block text-sm font-semibold text-gray-300 mb-2",children:"Seu Nome ou Handle do X (opcional)"}),(0,r.jsx)("input",{type:"text",id:"name",value:e.name,onChange:a=>t({...e,name:a.target.value}),placeholder:"Ex: @seunome",className:"w-full px-4 py-3 bg-card border border-border rounded-lg focus:outline-none focus:border-accent-blue/50 transition-colors text-white placeholder:text-gray-500"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"email",className:"block text-sm font-semibold text-gray-300 mb-2",children:"Seu Email (opcional)"}),(0,r.jsx)("input",{type:"email",id:"email",value:e.email,onChange:a=>t({...e,email:a.target.value}),placeholder:"[email protected]",className:"w-full px-4 py-3 bg-card border border-border rounded-lg focus:outline-none focus:border-accent-blue/50 transition-colors text-white placeholder:text-gray-500"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"Usaremos apenas para notificar quando sua p\xe1gina estiver pronta."})]}),n&&(0,r.jsx)("div",{className:"p-4 bg-red-500/20 border border-red-500/50 rounded-lg text-red-300 text-sm",children:n}),(0,r.jsx)("button",{type:"submit",disabled:"submitting"===a,className:"w-full px-8 py-4 bg-gradient-to-r from-accent-gold to-accent-blue rounded-lg font-semibold hover:scale-[1.02] transition-transform disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:"submitting"===a?"Enviando...":"Enviar Pergunta"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 text-center",children:"* Campos obrigat\xf3rios"})]})}}},function(e){e.O(0,[971,117,744],function(){return e(e.s=20504)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.