(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[622],{72431:function(){},16704:function(e,s,l){Promise.resolve().then(l.bind(l,60731))},60731:function(e,s,l){"use strict";l.r(s);var t=l(57437),a=l(2265),n=l(96621),d=l(33145),i=l(29116),c=l(76600);s.default=()=>{let{eventId:e}=(0,c.useRouter)().query,[s,l]=(0,a.useState)(null),[r,m]=(0,a.useState)(!0),[o,x]=(0,a.useState)("");return((0,a.useEffect)(()=>{e&&(async()=>{try{let s=await (0,i.Y)(Number(e));l(s)}catch(e){console.error("Error fetching event data:",e)}finally{m(!1)}})()},[e]),r)?(0,t.jsx)("p",{children:"Loading event..."}):s?(0,t.jsx)("div",{className:"flex-1 p-4 flex flex-col gap-4 xl:flex-row w-full",children:(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsx)("div",{className:"flex flex-col lg:flex-row gap-4 w-full",children:(0,t.jsxs)("div",{className:"bg-slate-400 py-6 px-4 rounded-md flex gap-4 w-full h-48 mt-4",children:[(0,t.jsx)("div",{className:"w-1/3",children:(0,t.jsx)(d.default,{src:s.image||"/singleEvent.png",alt:"Event Image",width:100,height:100})}),(0,t.jsxs)("div",{className:"w-2/3 flex flex-col justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold",children:s.title}),(0,t.jsx)(n.Z,{table:"Events",type:"update"})]}),(0,t.jsx)("div",{className:"flex items-center justify-between gap-2 flex-wrap text-xs font-medium",children:(0,t.jsxs)("div",{className:"w-full md:w-1/3 flex items-center gap-2",children:[(0,t.jsx)(d.default,{src:"/role.png",alt:"",width:18,height:18}),(0,t.jsxs)("span",{className:"text-lg font-medium text-gray-700",children:["Event ID: ",s.eventId]})]})})]})]})}),(0,t.jsxs)("div",{className:"mt-4 bg-slate-300 py-6 px-4 rounded-md w-full",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Description"}),(0,t.jsxs)("div",{className:"bg-white p-6 rounded-lg shadow w-full",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold mb-2",children:s.title}),(0,t.jsx)("p",{className:"text-gray-700 text-base",children:s.description})]})]}),(0,t.jsxs)("div",{className:"mt-4 bg-slate-300 py-6 px-4 rounded-md w-full",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Event Information"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"bg-white p-4 rounded-lg shadow flex items-center gap-4",children:[(0,t.jsx)(d.default,{src:"/date_joined.png",alt:"",width:18,height:18}),(0,t.jsx)("span",{className:"font-medium",children:s.date})]}),(0,t.jsxs)("div",{className:"bg-white p-4 rounded-lg shadow flex items-center gap-4",children:[(0,t.jsx)(d.default,{src:"/location.png",alt:"",width:18,height:18}),(0,t.jsx)("span",{className:"font-medium",children:s.venue})]}),(0,t.jsxs)("div",{className:"bg-white p-4 rounded-lg shadow flex items-center gap-4",children:[(0,t.jsx)(d.default,{src:"/time.png",alt:"",width:18,height:18}),(0,t.jsx)("span",{className:"font-medium",children:s.startTime})]}),(0,t.jsxs)("div",{className:"bg-white p-4 rounded-lg shadow flex items-center gap-4",children:[(0,t.jsx)(d.default,{src:"/time.png",alt:"",width:18,height:18}),(0,t.jsx)("span",{className:"font-medium",children:s.endTime})]})]})]}),(0,t.jsxs)("div",{className:"bg-white p-4 rounded-lg shadow flex flex-col gap-2 col-span-full mt-4",children:[(0,t.jsx)("h3",{className:"text-md font-semibold",children:"Notes"}),(0,t.jsx)("textarea",{className:"w-full p-2 border rounded-md resize-none focus:outline-none focus:ring-2 focus:ring-blue-400",rows:4,placeholder:"Leave a note about this event..."})]})]})}):(0,t.jsx)("p",{children:"Event not found."})}}},function(e){e.O(0,[145,505,591,600,621,971,117,744],function(){return e(e.s=16704)}),_N_E=e.O()}]);