"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[83052],{83052:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var i=n(10467),o=n(2138),a=n(96698),d=n(25572),r=n(86654),s=n(54438),c=n(2910),l=n(58197),u=n(68273),v=n(88246),m=n(73955);let y=(()=>{var e;class AddonModH5PActivityIndexPage extends o._{constructor(){super(...arguments),this.canLeaveSafely=!1}canLeave(){var e=this;return(0,i.A)((function*(){var t;if(null===(t=e.activityComponent)||void 0===t||!t.playing||e.activityComponent.isOpeningPage||e.activityComponent.saveStateEnabled)return!0;if(!e.canLeaveSafely)try{return yield d.CoreAlerts.confirmLeaveWithChanges(),!0}catch{return!1}return!0}))()}setCanleaveSafely(e){this.canLeaveSafely=e,this.remainingTimeout&&clearTimeout(this.remainingTimeout),this.remainingTimeout=window.setTimeout((()=>{this.canLeaveSafely=!1}),1e4)}ngOnDestroy(){this.remainingTimeout&&clearTimeout(this.remainingTimeout)}}return(e=AddonModH5PActivityIndexPage).ɵfac=(()=>{let t;return function AddonModH5PActivityIndexPage_Factory(n){return(t||(t=s.xGo(e)))(n||e)}})(),e.ɵcmp=s.VBU({type:e,selectors:[["page-addon-mod-h5pactivity-index"]],viewQuery:function AddonModH5PActivityIndexPage_Query(e,t){if(1&e&&s.GBs(a.AddonModH5PActivityIndexComponent,5),2&e){let e;s.mGM(e=s.lsd())&&(t.activityComponent=e.first)}},standalone:!0,features:[s.Vt3,s.aNF],decls:14,vars:12,consts:[["collapsible",""],["slot","start"],[3,"text"],["contextLevel","module",3,"text","contextInstanceId","courseId"],["slot","end"],["slot","fixed",3,"ionRefresh","disabled"],[3,"pullingText"],[3,"dataRetrieved","onActivityFinish","module","courseId"]],template:function AddonModH5PActivityIndexPage_Template(e,t){1&e&&(s.j41(0,"ion-header",0)(1,"ion-toolbar")(2,"ion-buttons",1),s.nrm(3,"ion-back-button",2),s.nI1(4,"translate"),s.k0s(),s.j41(5,"ion-title")(6,"h1"),s.nrm(7,"core-format-text",3),s.k0s()(),s.nrm(8,"ion-buttons",4),s.k0s()(),s.j41(9,"ion-content")(10,"ion-refresher",5),s.bIt("ionRefresh",(function AddonModH5PActivityIndexPage_Template_ion_refresher_ionRefresh_10_listener(e){return null==t.activityComponent?null:t.activityComponent.doRefresh(e.target)})),s.nrm(11,"ion-refresher-content",6),s.nI1(12,"translate"),s.k0s(),s.j41(13,"addon-mod-h5pactivity-index",7),s.bIt("dataRetrieved",(function AddonModH5PActivityIndexPage_Template_addon_mod_h5pactivity_index_dataRetrieved_13_listener(e){return t.updateData(e)}))("onActivityFinish",(function AddonModH5PActivityIndexPage_Template_addon_mod_h5pactivity_index_onActivityFinish_13_listener(e){return t.setCanleaveSafely(e)})),s.k0s()()),2&e&&(s.R7$(3),s.Y8G("text",s.bMT(4,8,"core.back")),s.R7$(4),s.Y8G("text",t.title)("contextInstanceId",t.module.id)("courseId",t.courseId),s.R7$(3),s.Y8G("disabled",null==t.activityComponent?null:t.activityComponent.showLoading),s.R7$(),s.FS9("pullingText",s.bMT(12,10,"core.pulltorefresh")),s.R7$(2),s.Y8G("module",t.module)("courseId",t.courseId))},dependencies:[r.n,c.QW,c.W9,c.eU,c.To,c.Ki,c.BC,c.ai,c.el,l.B,u.M,v.i,m.D9,a.AddonModH5PActivityIndexComponent],encapsulation:2}),AddonModH5PActivityIndexPage})()}}]);