(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2051],{14913:function(e,i,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/new-courses/[id]",function(){return t(25458)}])},67148:function(e,i,t){"use strict";t.d(i,{Z:function(){return h}});var n=t(85893),s=t(9008),r=t.n(s),c=t(67294),o=t(53637),a=t(35773),l=t(95305),d=t(89885),m=t(5152),u=t.n(m),p=t(35153);function h(e){var i=(0,c.useContext)(d.Z),t=i.appConfig,s=(i.hasSession,t.web_clientname),m=t.web_metadescription||"",u=t.web_metakeywords||"";return(0,n.jsxs)("div",{className:"position-relative",children:[(0,n.jsxs)(r(),{children:[window.videojs&&(0,n.jsx)("script",{async:!0,src:"https://cdn.jsdelivr.net/npm/videojs-contrib-eme@3.11.1/dist/videojs-contrib-eme.js"}),(0,n.jsx)("link",{rel:"shortcut icon",href:t.web_logotransparent}),(0,n.jsx)("meta",{charSet:"utf-8"}),(0,n.jsx)("meta",{name:"viewport",content:"initial-scale=1.0, width=device-width"}),(0,n.jsx)("title",{children:s}),(0,n.jsx)("meta",{name:"title",content:s},"title"),(0,n.jsx)("meta",{name:"description",content:m},"description"),(0,n.jsx)("meta",{name:"keywords",content:u},"keywords"),(0,n.jsx)("meta",{property:"og:title",content:s},"og:title"),(0,n.jsx)("meta",{property:"og:description",content:m},"og:description"),(0,n.jsx)("meta",{property:"og:type",content:"website"},"og:type"),(0,n.jsx)("meta",{name:"twitter:card",content:"summary_large_image"})]}),(0,n.jsx)("div",{className:"shadow-sm",children:(0,n.jsx)(o.Z,{children:(0,n.jsx)(a.Z,{className:"justify-content-center",children:(0,n.jsx)(l.Z,{xl:"12",children:(0,n.jsx)(p.Z,{})})})})}),(0,n.jsx)("div",{id:"teachcodeFullWidthContainer",children:e.children})]})}u()(t.e(6169).then(t.t.bind(t,16169,23)),{loadableGenerated:{webpack:function(){return[16169]}},ssr:!1})},25458:function(e,i,t){"use strict";t.r(i),t.d(i,{default:function(){return P}});var n=t(47568),s=t(26042),r=t(69396),c=t(97582),o=t(85893),a=t(96486),l=t(67294),d=t(35773),m=t(95305),u=t(39886),p=t(47911),h=t(54610),x=t(84082),_=t(92817),j=t(9888),w=t(9168),f=t(45508),y=t(62765),g=t(96076),b=t(47041),k=t(64481),v=t(89885),Z=t(41664),N=t.n(Z),C=t(67148),E=t(65356),I=t(14193);function P(e){var i,t,n,r=e.api,c=e.lcId,_=e.subCourses,y=e.isExtend,g=void 0===y?"0":y,b=(0,l.useContext)(v.Z),Z=b.appConfig,C=(b.currentUser,b.hasSession),P=b.toggleAuthModal,S=(0,l.useState)(e.course),z=S[0],T=S[1],O=(0,l.useState)(),F=O[0],A=O[1],D=function(){return A(!F)},J=(0,l.useState)(),K=J[0],q=J[1];return(0,l.useEffect)((function(){if("1"==g){var i,t,n=localStorage.getItem("extend_info"),r={extended_validity:null!==(i=e.course.extended_validity)&&void 0!==i?i:e.course.validity,extended_validity_price:null!==(t=e.course.extended_validity_price)&&void 0!==t?t:e.course.price};if(n)try{n=JSON.parse(n)}catch(c){n=r}else n=r,localStorage.setItem("extend_info",JSON.stringify(n));z.price=Number(n.extended_validity_price),z.mrp=0,T((0,s.Z)({},z))}return function(){localStorage.removeItem("extend_info")}}),[]),(0,o.jsxs)("div",{className:"details-container",children:[(0,o.jsx)("div",{className:"cover-image",children:(0,o.jsx)("div",{className:"container-lg",children:(0,o.jsx)(d.Z,{noGutters:!0,children:(0,o.jsx)(m.Z,{md:{size:5,offset:1},xl:{size:6,offset:1},children:(0,o.jsx)("h1",{className:"text-white mb-0 text-center text-md-start",children:z.course_name})})})})}),(0,o.jsx)("div",{className:"container-lg mb-4",children:(0,o.jsxs)(d.Z,{className:"mt-4 details",children:[(0,o.jsx)(m.Z,{md:{size:5,offset:1},xl:{size:6,offset:1},xs:{order:1},children:(0,o.jsx)(k.Z,{screenType:"1"==z.is_paid?"purchased":"view",course:z,lcId:c,api:r,subCourses:_})}),(0,o.jsx)(m.Z,{md:{size:4},xs:{order:0},className:"price-card",children:(0,o.jsxs)(u.Z,{color:"primary-light",children:[(0,o.jsx)(p.Z,{top:!0,height:220,className:(0,a.isEmpty)(z.course_thumbnail)?"img-contain":"",src:z.course_thumbnail||"/empty-image-web.svg"}),(0,o.jsxs)(h.Z,{children:[z.price>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,o.jsx)("div",{className:"font-xs text-gray",children:"PRICE"}),z.id&&"1"==Z.web_enablecourselike&&(0,o.jsx)(I.ZP,{courseId:z.id,itemType:10,likesCount:z.likes_count})]}),(0,o.jsx)("h5",{children:(0,o.jsx)(j.Z,{price:z.price_without_gst>0?z.price_without_gst:z.price,mrp:z.mrp})})]}),"0"==z.is_paid?(0,o.jsxs)("div",{children:[!(null===(i=Z.host)||void 0===i?void 0:i.includes("harkirat"))&&!(null===(t=Z.host)||void 0===t?void 0:t.includes("100xdevs"))||(null===(n=Z.host)||void 0===n?void 0:n.includes("classx"))?(0,o.jsx)(w.Z,{product:(0,s.Z)({id:z.id,title:z.course_name,pricingPlans:z.pricing_plans,price:z.price,image:z.course_thumbnail,itemId:c||z.id,itemType:c?11:10,priceKicker:z.price_kicker,showEmiPay:z.showemipay,installmentPlans:z.installmentplan,folder_courses:1},z)}):(0,o.jsx)(x.Z,{className:"mt-2",block:!0,color:"primary",onClick:function(){return window.open("https://harkirat.classx.co.in/new-courses/".concat(z.id),"_blank")},children:"Buy Now"}),!(0,a.isEmpty)(Z.web_paymentlink1)&&!(0,a.isEmpty)(Z.web_paymentlink1name)&&(0,o.jsx)(x.Z,{className:"mt-2",block:!0,color:"primary",onClick:function(){return window.open(Z.web_paymentlink1,"_blank")},children:Z.web_paymentlink1name}),!(0,a.isEmpty)(Z.web_paymentlink2)&&!(0,a.isEmpty)(Z.web_paymentlink2name)&&(0,o.jsx)(x.Z,{className:"mt-2",block:!0,color:"primary",onClick:function(){return window.open(Z.web_paymentlink2,"_blank")},children:Z.web_paymentlink2name})]}):(0,o.jsxs)(o.Fragment,{children:["1"==z.showemipay&&(0,o.jsx)(w.Z,{product:(0,s.Z)({id:z.id,title:z.course_name,pricingPlans:z.pricing_plans,price:z.price,image:z.course_thumbnail,itemId:c||z.id,itemType:c?11:10,priceKicker:z.price_kicker,showEmiPay:z.showemipay,installmentPlans:z.installmentplan,folder_courses:1},z)}),"1"==g&&(0,o.jsx)(w.Z,{product:(0,s.Z)({id:z.id,title:z.course_name,price:z.price,image:z.course_thumbnail,itemId:c||z.id,itemType:c?11:10,priceKicker:z.price_kicker,folder_courses:1},z),isExtend:!0}),(0,o.jsx)(N(),{href:"/new-courses/".concat(z.id,"/content"),children:(0,o.jsx)(x.Z,{tag:"a",block:!0,color:"primary",className:"mt-1",children:"View Content"})})]}),!(0,a.isEmpty)(z.course_demo_pdf)&&(0,o.jsx)(x.Z,{color:"light border",block:!0,className:"mt-2",onClick:function(){C?(q(z.course_demo_pdf),D()):P()},children:Z.web_coursedemopdfname||"View Demo PDF"})]})]})})]})}),K&&(0,o.jsx)(E.Z,{isOpen:F,toggle:D,link:(0,f.NA)(K),allowDownload:"1"})]})}P.getInitialProps=function(){var e=(0,n.Z)((function(e){var i,t,n,o,a;return(0,c.__generator)(this,(function(c){switch(c.label){case 0:return i=e.query,t=i.api?(0,f.NA)(i.api):(0,b.getCookie)(g.z1,e),(0,b.getCookie)(g.JR),n=i.id.split("-",1)[0],[4,(0,_.Yt)(t,n)];case 1:return(null===(o=c.sent())||void 0===o?void 0:o.length)<1?[2,{statusCode:404}]:(a=[],1!=o[0].is_combo?[3,3]:[4,(0,_.q7)(t,n,i.lcId,(0,b.getCookie)(g.z1,e))]);case 2:a=c.sent(),c.label=3;case 3:return[2,(0,r.Z)((0,s.Z)({course:o[0],subCourses:a},i),{api:t||"",lcId:i.lcId})]}}))}));return function(i){return e.apply(this,arguments)}}(),P.layout=y.kz,P.layoutTeachcode=C.Z}},function(e){e.O(0,[9412,2238,2480,8623,5288,4444,3315,9168,861,6410,7517,3956,5920,5172,2967,1984,2699,7732,8785,9774,2888,179],(function(){return i=14913,e(e.s=i);var i}));var i=e.O();_N_E=i}]);