"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[31400],{9019:(e,t,n)=>{n.r(t),n.d(t,{AddonModQuizAccessOfflineAttemptsComponent:()=>f});var o=n(10467),s=n(91416),i=n(74149),a=n(86654),c=n(54438),d=n(89417),r=n(2910),p=n(73955);const _c0=e=>({$a:e});let f=(()=>{var e;class AddonModQuizAccessOfflineAttemptsComponent{constructor(e){this.fb=e,this.prefetch=!1,this.syncTimeReadable=""}ngOnInit(){var e=this;return(0,o.A)((function*(){var t;if(null===(t=e.form)||void 0===t||t.addControl("confirmdatasaved",e.fb.control(1)),!e.quiz)return;const n=yield i.AddonModQuizSync.getSyncTime(e.quiz.id);e.syncTimeReadable=i.AddonModQuizSync.getReadableTimeFromTimestamp(n)}))()}}return(e=AddonModQuizAccessOfflineAttemptsComponent).ɵfac=function AddonModQuizAccessOfflineAttemptsComponent_Factory(t){return new(t||e)(c.rXU(d.ok))},e.ɵcmp=c.VBU({type:e,selectors:[["addon-mod-quiz-access-offline-attempts"]],inputs:{rule:"rule",quiz:"quiz",attempt:"attempt",prefetch:[c.Mj6.HasDecoratorInputTransform,"prefetch","prefetch",s.G],siteId:"siteId",form:"form"},standalone:!0,features:[c.GFd,c.aNF],decls:8,vars:9,consts:[[1,"ion-text-wrap"],[1,"item-heading"]],template:function AddonModQuizAccessOfflineAttemptsComponent_Template(e,t){1&e&&(c.j41(0,"ion-item",0)(1,"ion-label")(2,"p",1),c.EFF(3),c.nI1(4,"translate"),c.k0s(),c.j41(5,"p"),c.EFF(6),c.nI1(7,"translate"),c.k0s()()()),2&e&&(c.R7$(3),c.JRh(c.bMT(4,2,"core.settings.synchronization")),c.R7$(3),c.JRh(c.i5U(7,4,"addon.mod_quiz.confirmcontinueoffline",c.eq3(7,_c0,t.syncTimeReadable))))},dependencies:[a.n,r.uz,r.he,p.D9],encapsulation:2}),AddonModQuizAccessOfflineAttemptsComponent})()}}]);