1import{r as i,j as e}from"./index-C79-5lOV.js";const j=()=>{const[a,d]=i.useState({name:"",email:"",subject:"",message:""}),[x,m]=i.useState(!1),[h,l]=i.useState(null),[u,o]=i.useState(""),[b,g]=i.useState("[email protected]"),n=t=>{const{id:s,value:r}=t.target;d(c=>({...c,[s]:r}))},f=async t=>{t.preventDefault(),m(!0),l(null),o("");try{const s=await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),r=await s.json();s.ok&&r.success?(l("success"),r.contactEmail&&g(r.contactEmail),d({name:"",email:"",subject:"",message:""})):(l("error"),o(r.message||"Something went wrong. Please try again."))}catch{l("error"),o("Network error. Please try again later.")}finally{m(!1)}},p=[{office:"Dean's Office",number:"0422-2984002"},{office:"Zonal Office (Zone-IX)",number:"0422-2984003"},{office:"Examination Cell",number:"0422-2984005"},{office:"General Administration-1",number:"0422-2984006"},{office:"General Administration-2",number:"0422-2984007"},{office:"General Administration-3",number:"0422-2984009"},{office:"Affiliation",number:"0422-2984010"},{office:"Academic Coordinator-UG Programmes",number:"0422-2984011"},{office:"Academic Coordinator-PG Programmes",number:"0422-2984012"}];return e.jsxs("div",{className:"flex-grow bg-gray-50 min-h-screen text-left pt-[116px] sm:pt-[126px] lg:pt-[136px]",children:[e.jsxs("section",{className:"relative h-[40vh] md:h-[50vh] flex items-center justify-center overflow-hidden",children:[e.jsx("img",{src:"/contact.webp",alt:"Contact Background",className:"absolute inset-0 h-full w-full object-cover"}),e.jsxs("div",{className:"bg-[rgb(120,12,12)]/60 backdrop-blur-md rounded-2xl shadow-lg px-6 py-6 md:py-10 flex flex-col items-center max-w-2xl mx-4 sm:mx-auto border border-white/30 animate-popIn text-center",children:[e.jsxs("h1",{className:"text-3xl sm:text-4xl lg:text-6xl font-black text-white mb-4 sm:mb-6 uppercase tracking-tight text-center",children:["Contact ",e.jsx("span",{className:"text-white",children:"Us"})]}),e.jsx("p",{className:"text-base sm:text-lg lg:text-xl text-white font-medium opacity-90 text-center",children:"Get in touch with the relevant offices for any assistance or inquiries"})]})]}),e.jsxs("main",{className:"max-w-7xl mx-auto py-10 sm:py-16 px-4 space-y-16 sm:space-y-20",children:[e.jsxs("section",{className:"animate-fadeIn",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("h2",{className:"text-2xl lg:text-4xl font-black text-[rgb(90,20,20)] uppercase tracking-tighter",children:"Office Directory"}),e.jsx("div",{className:"h-1.5 w-20 bg-[rgb(115,40,40)] mx-auto mt-4 rounded-full"})]}),e.jsxs("div",{className:"bg-white rounded-3xl shadow-xl overflow-hidden border border-gray-100 flex flex-col md:flex-row",children:[e.jsxs("div",{className:"md:w-1/3 bg-[rgb(100,25,25)] p-8 sm:p-12 text-white flex flex-col justify-center border-2 border-white",children:[e.jsx("h3",{className:"text-2xl font-black mb-6 uppercase tracking-tight",children:"Direct Support"}),e.jsx("p",{className:"text-white font-medium leading-relaxed mb-8 italic",children:"Search for the specific office or department extension to get immediate assistance."}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"flex items-center gap-4 bg-white/10 p-4 rounded-2xl",children:[e.jsx("span",{className:"text-2xl",children:"â¡"}),e.jsx("span",{className:"text-sm font-bold uppercase tracking-widest",children:"Fast Response"})]})})]}),e.jsx("div",{className:"flex-grow overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{className:"bg-[rgb(100,25,25)] border-b border-gray-100",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 sm:px-8 py-5 text-xs font-black text-white uppercase tracking-widest",children:"Office / Department"}),e.jsx("th",{className:"px-4 sm:px-8 py-5 text-xs font-black text-white uppercase tracking-widest",children:"Contact Number"})]})}),e.jsx("tbody",{className:"divide-y divide-gray-50",children:p.map((t,s)=>e.jsxs("tr",{className:"hover:bg-[rgb(220,140,140)]/30 transition-colors group",children:[e.jsx("td",{className:"px-4 sm:px-8 py-4 text-sm font-bold text-gray-700 group-hover:text-[rgb(100,25,25)]",children:t.office}),e.jsx("td",{className:"px-4 sm:px-8 py-4",children:e.jsx("a",{href:`tel:${t.number}`,className:"text-[rgb(115,40,40)] font-black hover:underline",children:t.number})})]},s))})]})})]})]}),e.jsx("section",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:[{title:"Campus Address",icon:"ð",content:["Maruthamalai Road,","Navavoor, Coimbatore - 641046"],color:"red"},{title:"Support Lines",icon:"ð",content:["0422-2984007","0422-2691124"],color:"red"},{title:"Email Enquiries",icon:"â",content:["[email protected]","[email protected]"],color:"emerald"}].map((t,s)=>e.jsxs("div",{className:"bg-white p-6 sm:p-8 lg:p-10 rounded-3xl shadow-sm border border-gray-100 text-center hover:shadow-xl hover:-translate-y-2 transition-all group",children:[e.jsx("div",{className:`w-20 h-20 bg-${t.color}-50 rounded-2xl flex items-center justify-center text-3xl mx-auto mb-6 group-hover: transition-transform`,children:t.icon}),e.jsx("h3",{className:"text-xl font-black text-[rgb(90,20,20)] uppercase tracking-tight mb-4",children:t.title}),e.jsx("div",{className:"space-y-1 text-gray-500 font-bold text-sm lg:text-base",children:t.content.map((r,c)=>e.jsx("p",{children:r},c))})]},s))}),e.jsxs("section",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10",children:[e.jsxs("div",{className:"bg-white rounded-3xl shadow-sm border border-gray-100 overflow-hidden h-[320px] sm:h-[420px] lg:h-[500px] flex flex-col",children:[e.jsxs("div",{className:"p-6 bg-gray-50 border-b border-gray-100 font-black text-xs uppercase tracking-widest text-[rgb(100,25,25)] flex justify-between",children:[e.jsx("span",{children:"ð Locate Us"}),e.jsx("span",{className:"text-[rgb(140,60,60)]",children:"Google Maps"})]}),e.jsx("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d15663.793975145732!2d76.8803026145726!3d11.042488637620748!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3ba85910327ab1e3%3A0x9f7a2b4ef20fe07!2sAnna%20University%20RC%20Coimbatore!5e0!3m2!1sen!2sin!4v1772527998548!5m2!1sen!2sin",className:"w-full flex-grow border-0 grayscale hover:grayscale-0 transition-all duration-700",allowFullScreen:"",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade",title:"Campus Location"})]}),e.jsxs("div",{className:"bg-[rgb(100,25,25)] rounded-3xl shadow-2xl p-6 sm:p-10 text-white flex flex-col justify-center animate-fadeInUp",children:[e.jsx("h2",{className:"text-3xl font-black mb-2 uppercase tracking-tighter",children:"Send a Message"}),e.jsx("p",{className:"text-white font-medium mb-8",children:"Fill out the form below and we'll get back to you within 24 hours."}),h==="success"&&e.jsxs("div",{className:"bg-green-100 border border-green-400 text-green-800 px-4 py-3 rounded-2xl relative mb-6 font-bold text-center",children:["â Message sent successfully! It has been dispatched to ",b,"."]}),h==="error"&&e.jsxs("div",{className:"bg-red-100 border border-red-400 text-red-800 px-4 py-3 rounded-2xl relative mb-6 font-bold text-center",children:["â ",u]}),e.jsxs("form",{onSubmit:f,className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[e.jsx("input",{type:"text",id:"name",value:a.name,onChange:n,required:!0,placeholder:"Full Name",className:"bg-white/10 border border-white/20 rounded-2xl p-4 outline-none text-white focus:bg-white/20 focu
1s:border-white/50 focus:ring-2 focus:ring-white/20 transition-all font-bold placeholder:text-white/60"}),e.jsx("input",{type:"email",id:"email",value:a.email,onChange:n,required:!0,placeholder:"Email Address",className:"bg-white/10 border border-white/20 rounded-2xl p-4 outline-none text-white focus:bg-white/20 focus:border-white/50 focus:ring-2 focus:ring-white/20 transition-all font-bold placeholder:text-white/60"})]}),e.jsx("input",{type:"text",id:"subject",value:a.subject,onChange:n,required:!0,placeholder:"Subject",className:"w-full bg-white/10 border border-white/20 rounded-2xl p-4 outline-none text-white focus:bg-white/20 focus:border-white/50 focus:ring-2 focus:ring-white/20 transition-all font-bold placeholder:text-white/60"}),e.jsx("textarea",{id:"message",value:a.message,onChange:n,required:!0,placeholder:"Your message here...",rows:"4",className:"w-full bg-white/10 border border-white/20 rounded-2xl p-4 outline-none text-white focus:bg-white/20 focus:border-white/50 focus:ring-2 focus:ring-white/20 transition-all font-bold placeholder:text-white/60 resize-none"}),e.jsx("button",{type:"submit",disabled:x,className:"w-full py-5 bg-[rgb(115,40,40)] text-white font-black text-lg rounded-2xl hover:bg-white hover:text-[rgb(100,25,25)] transition-all shadow-xl active:scale-95 uppercase tracking-widest disabled:opacity-50 disabled:cursor-not-allowed",children:x?"Sending...":"Send Message"})]})]})]})]})]})};export{j 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.