1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2182],{1674:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/courses",function(){return a(8556)}])},8556:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSG:()=>o,default:()=>x});var t=a(7876),l=a(4232),n=a(8230),r=a.n(n),c=a(6332),d=a(2504),i=a(624),o=!0;function x({data:e}){let[s,a]=(0,l.useState)(null),[n,o]=(0,l.useState)([]);(0,l.useEffect)(()=>{e?.contentBlock?.MAIN_CONTENT?.advanceData?.data&&o(e.contentBlock.MAIN_CONTENT.advanceData.data)},[e]);let x=s=>{a(s),s?o(e?.contentBlock?.MAIN_CONTENT?.advanceData?.data.filter(e=>s==e?.course?.id)):o(e?.contentBlock?.MAIN_CONTENT?.advanceData?.data)};return(0,t.jsx)("div",{className:"min-h-screen bg-gray-50",children:e?.contentBlock?.MAIN_CONTENT&&(0,t.jsx)("section",{className:"py-12",children:(0,t.jsx)("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"grid lg:grid-cols-4 gap-8",children:[(0,t.jsx)("div",{className:"lg:col-span-1",children:(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-sm p-4 sticky top-24",children:[e.contentBlock.MAIN_CONTENT.heading&&(0,t.jsx)("h3",{className:"text-lg font-bold text-gray-900 pb-4 border-b",children:e.contentBlock.MAIN_CONTENT.heading}),e.contentBlock.MAIN_CONTENT.advanceData?.course?.length>0&&(0,t.jsxs)("ul",{className:"mt-4 space-y-1",children:[(0,t.jsx)("li",{children:(0,t.jsxs)("button",{onClick:()=>x(null),className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-left transition-colors ${null===s?"bg-brand-700 text-white":"text-gray-600 hover:bg-gray-100"}`,children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current flex-shrink-0"}),(0,t.jsx)("span",{children:"All Courses"})]})}),e.contentBlock.MAIN_CONTENT.advanceData.course.map((e,a)=>(0,t.jsx)("li",{children:(0,t.jsxs)("button",{onClick:()=>x(e.id),className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-left transition-colors ${s===e.id?"bg-brand-700 text-white":"text-gray-600 hover:bg-gray-100"}`,children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-current flex-shrink-0"}),(0,t.jsx)("span",{children:e.name})]})},a))]})]})}),(0,t.jsxs)("div",{className:"lg:col-span-3",children:[(0,t.jsx)("div",{className:"bg-white rounded-xl shadow-sm px-4 py-3 mb-6",children:(0,t.jsxs)("span",{className:"text-sm text-gray-500",children:["Showing ",(0,t.jsx)("span",{className:"font-semibold text-gray-900",children:n.length})," results"]})}),n.length>0&&(0,t.jsx)("div",{className:"grid sm:grid-cols-2 xl:grid-cols-3 gap-6",children:n.map((e,s)=>(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-sm overflow-hidden group hover:shadow-md transition-shadow",children:[(0,t.jsx)("div",{className:"relative overflow-hidden",children:(0,t.jsx)(r(),{href:(0,i.w)(e.uri),children:(0,t.jsx)("img",{...(0,d.u3)(e.thumb,e.name,{className:"w-full aspect-video object-contain bg-gray-50 group-hover:scale-105 transition-transform duration-300"})})})}),(0,t.jsxs)("div",{className:"p-4 space-y-3",children:[(0,t.jsx)("h3",{className:"font-semibold text-gray-900 line-clamp-2",children:(0,t.jsx)(r(),{href:(0,i.w)(e.uri),className:"hover:text-brand-700 transition-colors",children:e.name})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,t.jsxs)("span",{className:"text-red-500 line-through flex items-center gap-0.5",children:[(0,t.jsx)(c.jtd,{className:"text-xs"}),e.MRP]}),(0,t.jsx)("span",{className:"text-gray-400",children:"|"}),(0,t.jsxs)("span",{className:"font-semibold text-gray-900 flex items-center gap-0.5",children:[(0,t.jsx)(c.jtd,{className:"text-xs"}),e.cost]})]}),(0,t.jsxs)("div",{className:"flex gap-2 pt-2",children:[(0,t.jsx)(r(),{href:(0,i.w)(e.uri),className:"flex-1 text-center py-2 px-3 rounded-lg bg-gray-100 text-gray-700 text-sm font-medium hover:bg-gray-200 transition-colors",children:"Details"}),(0,t.jsx)(r(),{href:`/buy/${e?.linkedProduct?.id}`,className:"flex-1 text-center py-2 px-3 rounded-lg bg-brand-700 text-white text-sm font-medium hover:bg-brand-800 transition-colors",children:"Enroll Now"})]})]})]},s))}),0===n.length&&(0,t.jsxs)("div",{className:"bg-white rounded-xl shadow-sm p-12 text-center",children:[(0,t.jsx)("svg",{className:"mx-auto w-12 h-12 text-gray-300 mb-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),(0,t.jsx)("p",{className:"text-gray-500",children:"No courses found"})]})]})]})})})})}}},e=>{e.O(0,[8585,636,6593,8792],()=>e(e.s=1674)),_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.