1import{U as b,r as d,j as e,H as x}from"./index-Ba4BgsO5.js";function h(){const{toast:n}=b(),[t,r]=d.useState({name:"",email:"",subject:"",message:""}),[l,i]=d.useState(!1),s=a=>{const{name:o,value:m}=a.target;r(u=>({...u,[o]:m}))},c=async a=>{a.preventDefault(),i(!0);try{if(!(await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).ok)throw new Error("Failed to send message");n({title:"Success!",description:"Your message has been sent. We'll get back to you soon."}),r({name:"",email:"",subject:"",message:""})}catch{n({title:"Error",description:"Failed to send message. Please try again.",variant:"destructive"})}finally{i(!1)}};return e.jsxs(e.Fragment,{children:[e.jsxs(x,{children:[e.jsx("title",{children:"Contact Us - NFL Draft HQ"}),e.jsx("meta",{name:"description",content:"Contact NFL Draft HQ with questions, feedback, or suggestions about our NFL news, draft tools, prospect rankings, and interactive mock draft simulators."}),e.jsx("link",{rel:"canonical",href:"https://nfldrafthq.com/contact"})]}),e.jsx("div",{className:"min-h-screen bg-gray-100 py-12 px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"max-w-md mx-auto bg-white rounded-lg shadow-md p-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-center text-gray-900 mb-2",children:"Contact Us"}),e.jsx("p",{className:"text-center text-gray-600 mb-6",children:"Have a question or feedback? We'd love to hear from you!"}),e.jsxs("form",{onSubmit:c,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),e.jsx("input",{type:"text",id:"name",name:"name",value:t.name,onChange:s,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500","data-testid":"input-contact-name"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),e.jsx("input",{type:"email",id:"email",name:"email",value:t.email,onChange:s,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500","data-testid":"input-contact-email"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"subject",className:"block text-sm font-medium text-gray-700 mb-1",children:"Subject"}),e.jsx("input",{type:"text",id:"subject",name:"subject",value:t.subject,onChange:s,required:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500","data-testid":"input-contact-subject"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"message",className:"block text-sm font-medium text-gray-700 mb-1",children:"Message"}),e.jsx("textarea",{id:"message",name:"message",value:t.message,onChange:s,required:!0,rows:5,className:"w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500","data-testid":"textarea-contact-message"})]}),e.jsx("button",{type:"submit",disabled:l,className:"w-full bg-blue-600 text-white font-medium py-2 px-4 rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors","data-testid":"button-contact-submit",children:l?"Sending...":"Send Message"})]})]})})]})}export{h as default};
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.