"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2562],{32562:(v,i,a)=>{a.r(i),a.d(i,{StudentDashboardPage:()=>g});var d=a(60177),u=a(89417),o=a(36375),c=a(45312),e=a(54438),h=a(20891);function _(t,r){1&t&&(e.j41(0,"div",2)(1,"ion-header",3)(2,"ion-toolbar")(3,"ion-title"),e.EFF(4,"Student Dashboard"),e.k0s()()(),e.j41(5,"ion-content",4)(6,"ion-header",5)(7,"ion-toolbar")(8,"ion-title",6),e.EFF(9,"Dashboard"),e.k0s()()()()()),2&t&&(e.R7$(),e.Y8G("translucent",!0),e.R7$(4),e.Y8G("fullscreen",!0))}function f(t,r){if(1&t&&(e.j41(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12)(6,"h2",13),e.nrm(7,"i",14),e.EFF(8," Student Dashboard"),e.k0s()(),e.j41(9,"div",15)(10,"div",16)(11,"div",17)(12,"h5"),e.EFF(13,"Total Purchased Courses"),e.k0s(),e.j41(14,"h2"),e.EFF(15),e.k0s()(),e.j41(16,"div",18),e.nrm(17,"img",19),e.k0s()()()(),e.nrm(18,"div",11),e.k0s()()()()),2&t){const n=e.XpG();e.R7$(15),e.JRh(n.courses.length)}}let g=(()=>{var t;class r{constructor(s){this.apiRequest=s,this.forMobile=c.c.forMobile,this.totalCourses=0,this.courses=[]}ngOnInit(){this.currentUser=JSON.parse(sessionStorage.getItem("user")||"{}"),this.loadUserCourse()}loadUserCourse(){this.apiRequest.get(`transaction/get_student_transactions/${this.currentUser.user_id}`).subscribe(s=>{s.status&&(this.courses=s.data.list)},s=>{console.error("Error fetching course data",s)})}}return(t=r).\u0275fac=function(s){return new(s||t)(e.rXU(h.x))},t.\u0275cmp=e.VBU({type:t,selectors:[["app-student-dashboard"]],standalone:!0,features:[e.aNF],decls:2,vars:2,consts:[["class","mobile","style","height:100%",4,"ngIf"],["class","desktop","style","height:100%;overflow-y: auto;overflow-x: auto;background:#f7f7f7;",4,"ngIf"],[1,"mobile",2,"height","100%"],[3,"translucent"],[3,"fullscreen"],["collapse","condense"],["size","large"],[1,"desktop",2,"height","100%","overflow-y","auto","overflow-x","auto","background","#f7f7f7"],[1,"wrapper"],[1,"sa4d25"],[1,"container-fluid"],[1,"row"],[1,"col-lg-12"],[1,"st_title"],[1,"uil","uil-apps"],[1,"col-xl-6","col-lg-6","col-md-6"],[1,"card_dash"],[1,"card_dash_left"],[1,"card_dash_right"],["src","assets/desktop/images/dashboard/online-course.svg","alt",""]],template:function(s,l){1&s&&e.DNE(0,_,10,2,"div",0)(1,f,19,1,"div",1),2&s&&(e.Y8G("ngIf",l.forMobile),e.R7$(),e.Y8G("ngIf",!l.forMobile))},dependencies:[o.bv,o.W9,o.eU,o.BC,o.ai,d.MD,d.bT,u.YN]}),r})()}}]);