(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[327],{1986:function(e,t,r){Promise.resolve().then(r.bind(r,3370))},3370:function(e,t,r){"use strict";r.r(t);var l=r(7437),a=r(2265),n=r(6691),s=r.n(n),o=r(1396),i=r.n(o),c=r(8409);let LabelInput=e=>{let{id:t,type:r="text",isTextarea:a,value:n,onChange:s,placeholder:o}=e;return(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:t,className:"block mb-1 text-sm font-medium text-gray-300 capitalize",children:t}),a?(0,l.jsx)("textarea",{id:t,rows:5,value:n,onChange:s,placeholder:o,className:"block w-full rounded-lg p-2.5 bg-black/[0.96] border border-gray-600 placeholder-gray-400 text-blue-400 text-sm focus:ring-purple-500 focus:border-purple-500"}):(0,l.jsx)("input",{id:t,type:r,value:n,onChange:s,placeholder:o,className:"block w-full rounded-lg p-2.5 bg-black/[0.96] border border-gray-600 placeholder-gray-400 text-blue-400 text-sm focus:ring-purple-500 focus:border-purple-500"})]})};t.default=()=>{let[e,t]=(0,a.useState)({name:"",email:"",Phone:"",subject:"",message:""}),[r,n]=(0,a.useState)(!1),[o,d]=(0,a.useState)(""),[u,m]=(0,a.useState)(""),handleChange=r=>{t({...e,[r.target.id]:r.target.value})},validateForm=()=>{let{name:t,email:r,Phone:l,subject:a,message:n}=e;return t&&r&&l&&a&&n?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)?!!/^[0-9]{10}$/.test(l)||(d("Please enter a valid 10-digit phone number."),m("error"),!1):(d("Please enter a valid email address."),m("error"),!1):(d("Please fill in all fields."),m("error"),!1)},handleSubmit=async r=>{if(r.preventDefault(),n(!0),d(""),m(""),!validateForm()){n(!1);return}try{let r=await fetch("/api/sendEmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),l=await r.json();r.ok?(d(l.message||"Message sent successfully!"),m("success"),t({name:"",email:"",Phone:"",subject:"",message:""})):(d(l.message||"Something went wrong. Please try again."),m("error"))}catch(e){d("An error occurred while sending the email."),m("error")}n(!1)};return(0,l.jsxs)("div",{className:"relative min-h-screen bg-black text-white px-6 py-40 overflow-hidden",children:[(0,l.jsx)("div",{className:"absolute -top-20 -left-20 w-96 h-96 bg-purple-500/20 blur-3xl rounded-full"}),(0,l.jsx)("div",{className:"absolute -bottom-20 -right-20 w-96 h-96 bg-pink-500/10 blur-2xl rounded-full"}),(0,l.jsxs)("div",{className:"flex flex-col items-center mb-12 z-10",children:[(0,l.jsx)(s(),{src:"/logo.png",alt:"E-Cell Logo",width:96,height:96,className:"hover:scale-110 transition-transform duration-300 drop-shadow-[0_0_12px_rgba(255,0,255,0.6)]"}),(0,l.jsx)("h1",{className:"mt-4 text-center text-4xl md:text-6xl font-bold bg-gradient-to-br from-yellow-400 via-pink-500 to-purple-500 bg-clip-text text-transparent",children:"Contact E-Cell IIIT Delhi"}),(0,l.jsx)("p",{className:"text-gray-400 text-center mt-2 max-w-xl italic",children:'"Have a question or want to collaborate? We\'d love to hear from you."'})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-6xl mx-auto z-10",children:[(0,l.jsxs)("div",{className:"bg-black/80 border border-gray-800 p-6 rounded-xl shadow-lg",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"\uD83D\uDCE9 Send us a Message"}),(0,l.jsxs)("form",{onSubmit:handleSubmit,className:"space-y-4",children:[(0,l.jsx)(LabelInput,{id:"name",value:e.name,onChange:handleChange,placeholder:"Your Full Name"}),(0,l.jsx)(LabelInput,{id:"email",type:"email",value:e.email,onChange:handleChange,placeholder:"you@example.com"}),(0,l.jsx)(LabelInput,{id:"Phone",value:e.Phone,onChange:handleChange,placeholder:"Your Contact Number"}),(0,l.jsx)(LabelInput,{id:"subject",value:e.subject,onChange:handleChange,placeholder:"Subject"}),(0,l.jsx)(LabelInput,{id:"message",isTextarea:!0,value:e.message,onChange:handleChange,placeholder:"Your message..."}),(0,l.jsxs)("button",{className:"p-[3px] relative w-full mt-2",children:[(0,l.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-purple-400 via-pink-500 to-red-400 rounded-full"}),(0,l.jsx)("div",{className:"w-full px-6 py-2 bg-black rounded-full font-bold relative z-10 text-white hover:bg-transparent text-center transition",children:r?"Sending...":"Send"})]}),o&&(0,l.jsx)("div",{className:"mt-3 text-sm text-center px-4 py-2 rounded-md font-medium ".concat("success"===u?"bg-blue-500/10 text-blue-300 border border-blue-500/20":"bg-red-500/10 text-red-300 border border-red-500/20"),children:o})]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsxs)("div",{className:"bg-black/80 border border-gray-800 p-6 rounded-xl shadow-lg flex flex-col justify-between h-full",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold ",children:"\uD83D\uDCCD Our Address"}),(0,l.jsxs)("p",{className:"text-gray-400 text-sm leading-relaxed",children:["E-Cell Room, ",(0,l.jsx)("br",{}),"Students Activity Center, ",(0,l.jsx)("br",{}),"IIIT Delhi, Okhla Phase III, ",(0,l.jsx)("br",{}),"New Delhi, 110020 ",(0,l.jsx)("br",{}),"\uD83D\uDCE7 ",(0,l.jsx)("a",{href:"mailto:ecell@iiitd.ac.in",className:"text-purple-400 underline",children:"ecell@iiitd.ac.in"})]}),(0,l.jsx)("div",{className:"bg-black/80 border border-gray-800 p-3 rounded-xl shadow-lg mt-4",children:(0,l.jsx)("iframe",{src:"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3504.777121084556!2d77.27070841143887!3d28.546418175610576!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x390ce3f4d90d641f%3A0x463184c4bba507ae!2sE-Cell%20IIIT%20Delhi!5e0!3m2!1sen!2sin!4v1748638121786!5m2!1sen!2sin",width:"100%",height:"250",className:"rounded-md w-full border border-gray-600",allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})]}),(0,l.jsxs)("div",{className:"bg-black/80 border border-gray-800 p-6 rounded-xl shadow-lg",children:[(0,l.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"\uD83C\uDF10 Connect With Us"}),(0,l.jsxs)("div",{className:"flex gap-5 text-2xl text-gray-400",children:[(0,l.jsx)(i(),{href:"https://linkedin.com",target:"_blank",children:(0,l.jsx)(c.ltd,{className:"hover:text-purple-400 hover:scale-110 transition duration-300"})}),(0,l.jsx)(i(),{href:"https://instagram.com",target:"_blank",children:(0,l.jsx)(c.Zf_,{className:"hover:text-pink-500 hover:scale-110 transition duration-300"})}),(0,l.jsx)(i(),{href:"https://twitter.com",target:"_blank",children:(0,l.jsx)(c.LCd,{className:"hover:text-yellow-300 hover:scale-110 transition duration-300"})}),(0,l.jsx)(i(),{href:"https://youtube.com",target:"_blank",children:(0,l.jsx)(c.V2E,{className:"hover:text-red-500 hover:scale-110 transition duration-300"})}),(0,l.jsx)(i(),{href:"https://facebook.com",target:"_blank",children:(0,l.jsx)(c.Am9,{className:"hover:text-blue-500 hover:scale-110 transition duration-300"})})]})]})]})]})]})}},3118:function(e,t,r){"use strict";r.d(t,{w_:function(){return GenIcon}});var l=r(2265),a={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},n=l.createContext&&l.createContext(a),s=["attr","size","title"];function _extends(){return(_extends=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.createElement(IconBase,_extends({attr:_objectSpread({},e.attr)},t),function Tree2Element(e){return e&&e.map((e,t)=>l.createElement(e.tag,_objectSpread({key:t},e.attr),Tree2Element(e.child)))}(e.child))}function IconBase(e){var elem=t=>{var r,{attr:a,size:n,title:o}=e,i=function(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r={};for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){if(t.indexOf(l)>=0)continue;r[l]=e[l]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(e,s),c=n||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),l.createElement("svg",_extends({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,a,i,{className:r,style:_objectSpread(_objectSpread({color:e.color||t.color},t.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),o&&l.createElement("title",null,o),e.children)};return void 0!==n?l.createElement(n.Consumer,null,e=>elem(e)):elem(a)}}},function(e){e.O(0,[240,413,165,971,472,744],function(){return e(e.s=1986)}),_N_E=e.O()}]);