"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2218],{2218:(A,a,i)=>{i.r(a),i.d(a,{CourseselectionPageModule:()=>T});var m=i(6019),g=i(9133),t=i(4599),d=i(8699),e=i(3668),C=i(2670),f=i(3321),h=i(6875);function p(s,r){if(1&s){const o=e.EpF();e.TgZ(0,"ion-item",4),e.NdJ("click",function(){const l=e.CHM(o).$implicit;return e.oxw().selectCourse(l)}),e._uU(1),e.qZA()}if(2&s){const o=r.$implicit;e.xp6(1),e.Oqu(o.coursename)}}const Z=[{path:"",component:(()=>{class s{constructor(o,n,c){this.gameService=o,this.modalCtrl=n,this.wsrest=c,this.courseList=[]}ngOnInit(){}ionViewWillEnter(){this.wsrest.getCoursesWithCaps().subscribe(o=>{this.courseList=this.filterUnblockedCourses(o.courses)})}filterUnblockedCourses(o){const n=[];return this.gameService.purchases&&this.gameService.getPurchases(),o.forEach(c=>{let l=!1;this.gameService.purchases.forEach((u,M)=>{(u.courseId===c.courseid||"unlockplatform"===u.productId)&&(l=!0)}),l||n.push(c)}),n}dismiss(){this.modalCtrl.dismiss()}selectCourse(o){this.modalCtrl.dismiss({courseid:o.courseid})}}return s.\u0275fac=function(o){return new(o||s)(e.Y36(C.B),e.Y36(t.IN),e.Y36(f.N))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-courseselection"]],decls:13,vars:4,consts:[["slot","start"],[3,"click"],["name","arrow-back"],["style","color: black",3,"click",4,"ngFor","ngForOf"],[2,"color","black",3,"click"]],template:function(o,n){1&o&&(e.TgZ(0,"ion-header"),e.TgZ(1,"ion-toolbar"),e.TgZ(2,"ion-buttons",0),e.TgZ(3,"ion-button",1),e.NdJ("click",function(){return n.dismiss()}),e._UZ(4,"ion-icon",2),e.qZA(),e.qZA(),e.TgZ(5,"ion-title"),e._uU(6,"Courses"),e.qZA(),e.qZA(),e.qZA(),e.TgZ(7,"ion-content"),e.TgZ(8,"ion-list"),e.TgZ(9,"ion-list-header"),e._uU(10),e.ALo(11,"translate"),e.qZA(),e.YNc(12,p,2,1,"ion-item",3),e.qZA(),e.qZA()),2&o&&(e.xp6(10),e.Oqu(e.lcZ(11,2,"SELECTITEM")),e.xp6(2),e.Q6J("ngForOf",n.courseList))},directives:[t.Gu,t.sr,t.Sm,t.YG,t.gu,t.wd,t.W2,t.q_,t.yh,m.sg,t.Ie],pipes:[h.X$],styles:[""]}),s})()}];let v=(()=>{class s{}return s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[d.Bz.forChild(Z)],d.Bz]}),s})();var P=i(1382);let T=(()=>{class s{}return s.\u0275fac=function(o){return new(o||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[P.m,m.ez,g.u5,t.Pc,v]]}),s})()}}]);