1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5192],{95362:function(e,t,n){Promise.resolve().then(n.bind(n,50427))},50427:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var s=n(57437),i=n(58357),r=n(2265),a=n(72848),l=n(16463),c=n(66648),o=n(52022),d=n(87385),u=n(40933),g=n(48185);function m(e){let{trainings:t,title:n,description:i,background:r="white"}=e,a=(0,l.useRouter)();return(0,s.jsx)("div",{className:"p-6 rounded-lg ".concat((()=>{switch(r){case"gray":return"bg-gray-50";case"pink-blue":return"bg-gradient-to-r from-pink-50 to-blue-50";default:return"bg-white"}})()),children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,s.jsxs)("div",{className:"text-center mb-8",children:[(0,s.jsx)("h2",{className:"text-3xl font-bold text-gray-900 mb-2",children:n}),(0,s.jsx)("p",{className:"text-gray-600",children:i})]}),(0,s.jsx)("div",{className:"space-y-4",children:t.map(e=>(0,s.jsx)(g.Zb,{className:"overflow-hidden cursor-pointer hover:shadow-lg transition-shadow duration-200",onClick:()=>a.push("/trainings/".concat(e._id)),children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row",children:[e.image&&(0,s.jsx)("div",{className:"relative w-full md:w-64 h-48",children:(0,s.jsx)(c.default,{src:e.image,alt:e.title,fill:!0,className:"object-cover"})}),(0,s.jsx)("div",{className:"flex-1 p-6",children:(0,s.jsxs)("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-4",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:e.title}),(0,s.jsx)("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2",children:e.description})]}),(0,s.jsxs)("div",{className:"flex flex-col space-y-2 text-sm text-gray-500 md:text-right md:min-w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,s.jsx)(o.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:e.trainer_name})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,s.jsx)(d.Z,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:new Date(e.date).toLocaleDateString()})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 justify-end",children:[(0,s.jsx)(u.Z,{className:"w-4 h-4"}),(0,s.jsxs)("span",{children:[e.startTime," - ",e.endTime]})]})]})]})})]})},e._id))})]})})}function p(){let[e,t]=(0,r.useState)([]),[n,l]=(0,r.useState)(!0);(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("".concat(i.CT,"/trainings")),n=await e.json();console.log("Fetched trainings:",n),t(n)}catch(e){console.error("Failed to fetch trainings:",e),t([])}finally{l(!1)}})()},[]);let{upcoming:c,ongoing:o,completed:d}=(e=>{let t=new Date;return{upcoming:e.filter(e=>new Date(e.date)>t),ongoing:e.filter(e=>{let n=new Date(e.date),s=new Date(n);return s.setDate(s.getDate()+(e.days||0)),n<=t&&s>=t}),completed:e.filter(e=>{let n=new Date(new Date(e.date));return n.setDate(n.getDate()+(e.days||0)),n<t})}})(e);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"bg-gray-200 p-3 md:p-8 min-h-screen flex flex-col gap-3 md:gap-4",children:[(0,s.jsx)(a.yV,{title:"Enhance Your Skills with Our Training Programs",description:"Join our comprehensive tech training programs",showButton:!0,buttonText:"Enroll Now",backgroundImage:"/trainingHero.svg",overlayOpacity:.7}),(0,s.jsx)(a.tb,{title:"Why Join Our Training",description:"Benefits of our training programs",benefits:[{title:"Expert Instructors",description:"Learn from industry professionals"},{title:"Hands-on Experience",description:"Practice with real-world projects"},{title:"Career Growth",description:"Enhance your professional skills"},{title:"Flexible Learning",description:"Learn at your own pace"}]}),(0,s.jsx)(a.hg,{title:"How It Works",description:"Our training process",approaches:[{title:"Enroll",description:"Choose your preferred training program",features:["Easy Enrollment","Flexible Schedule","Course Materials"]},{title:"Learn",description:"Attend sessions and complete assignments",features:["Live Sessions","Practical Exercises","Mentor Support"]},{title:"Graduate",description:"Complete the program and get certified",features:["Certification","Project Portfolio","Job Support"]}],background:"white"}),n?(0,s.jsx)("div",{className:"flex justify-center items-center min-h-[200px]",children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"})}):(0,s.jsxs)("div",{className:"space-y-8",children:[o.length>0&&(0,s.jsx)(m,{trainings:o,title:"Ongoing Trainings",description:"Currently running training programs you can join now",background:"pink-blue"}),c.length>0&&(0,s.jsx)(m,{trainings:c,title:"Upcoming Trainings",description:"Register for these upcoming training programs",background:"white"}),d.length>0&&(0,s.jsx)(m,{trainings:d,title:"Past Trainings",description:"View our previous training programs",background:"gray"}),0===e.length&&(0,s.jsxs)("div",{className:"text-center py-8",children:[(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-600",children:"No trainings found"}),(0,s.jsx)("p",{className:"text-gray-500",children:"Check back later for new training programs"})]})]})]})})}},58357:function(e,t,n){"use strict";n.d(t,{CT:function(){return s},bz:function(){return r},nL:function(){return i}});
1let s=(n(20357).env.NEXT_PUBLIC_CLOUD_API_URL||"https://excelrs-cloud-new-1069037816864.asia-south1.run.app").replace(/\/+$/,""),i="https://powr-api.lawazia.tech";function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=String(e||"").replace(/^\/+/,"");return t?"".concat(i,"/").concat(t):i}}},function(e){e.O(0,[4868,6648,1513,7612,2848,2971,7023,1744],function(){return e(e.s=95362)}),_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.