"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[9213],{9213:(o,n,e)=>{e.r(n),e.d(n,{AddonModBookTocComponent:()=>u});var t=e(79555),d=e(86654),i=e(54438),s=e(60177),a=e(2910),c=e(86198),l=e(58197),m=e(88246),r=e(43570),p=e(73955);function AddonModBookTocComponent_ion_item_13_span_3_Template(o,n){if(1&o&&(i.j41(0,"span",9),i.EFF(1),i.k0s()),2&o){const o=i.XpG().$implicit;i.R7$(),i.SpI("",o.indexNumber," ")}}function AddonModBookTocComponent_ion_item_13_span_4_Template(o,n){1&o&&(i.j41(0,"span",10),i.EFF(1,"• "),i.k0s())}function AddonModBookTocComponent_ion_item_13_Template(o,n){if(1&o){const o=i.RV6();i.j41(0,"ion-item",4),i.bIt("click",(function AddonModBookTocComponent_ion_item_13_Template_ion_item_click_0_listener(){const n=i.eBV(o).$implicit,e=i.XpG();return i.Njj(e.loadChapter(n.id))})),i.j41(1,"ion-label")(2,"p",5),i.DNE(3,AddonModBookTocComponent_ion_item_13_span_3_Template,2,1,"span",6)(4,AddonModBookTocComponent_ion_item_13_span_4_Template,2,0,"span",7),i.nrm(5,"core-format-text",8),i.k0s()()()}if(2&o){const o=n.$implicit,e=i.XpG();i.AVh("item-dimmed",o.hidden),i.Y8G("detail",!1),i.BMQ("aria-current",e.selected===o.id?"page":"false"),i.R7$(2),i.AVh("ion-padding-start",!(!e.addPadding||1!==o.level)||null),i.R7$(),i.Y8G("ngIf",e.showNumbers),i.R7$(),i.Y8G("ngIf",e.showBullets),i.R7$(),i.Y8G("text",o.title)("contextInstanceId",e.moduleId)("courseId",e.courseId)}}let u=(()=>{var o;class AddonModBookTocComponent{constructor(){this.chapters=[],this.showNumbers=!0,this.addPadding=!0,this.showBullets=!1}ngOnInit(){this.book&&(this.showNumbers=1==this.book.numbering,this.showBullets=2==this.book.numbering,this.addPadding=0!=this.book.numbering)}loadChapter(o){t.W3.dismiss(o)}closeModal(){t.W3.dismiss()}}return(o=AddonModBookTocComponent).ɵfac=function AddonModBookTocComponent_Factory(n){return new(n||o)},o.ɵcmp=i.VBU({type:o,selectors:[["addon-mod-book-toc"]],inputs:{moduleId:"moduleId",chapters:"chapters",selected:"selected",courseId:"courseId",book:"book"},standalone:!0,features:[i.aNF],decls:14,vars:7,consts:[["slot","end"],["fill","clear",3,"click","ariaLabel"],["name","fas-xmark","slot","icon-only","aria-hidden","true"],["class","ion-text-wrap","button","",3,"item-dimmed","detail","click",4,"ngFor","ngForOf"],["button","",1,"ion-text-wrap",3,"click","detail"],[1,"item-heading"],["class","addon-mod-book-number",4,"ngIf"],["class","addon-mod-book-bullet",4,"ngIf"],["contextLevel","module",3,"text","contextInstanceId","courseId"],[1,"addon-mod-book-number"],[1,"addon-mod-book-bullet"]],template:function AddonModBookTocComponent_Template(o,n){1&o&&(i.j41(0,"ion-header")(1,"ion-toolbar")(2,"ion-title")(3,"h1"),i.EFF(4),i.nI1(5,"translate"),i.k0s()(),i.j41(6,"ion-buttons",0)(7,"ion-button",1),i.nI1(8,"translate"),i.bIt("click",(function AddonModBookTocComponent_Template_ion_button_click_7_listener(){return n.closeModal()})),i.nrm(9,"ion-icon",2),i.k0s()()()(),i.j41(10,"ion-content")(11,"nav")(12,"ion-list"),i.DNE(13,AddonModBookTocComponent_ion_item_13_Template,6,11,"ion-item",3),i.k0s()()()),2&o&&(i.R7$(4),i.JRh(i.bMT(5,3,"addon.mod_book.toc")),i.R7$(3),i.Y8G("ariaLabel",i.bMT(8,5,"core.close")),i.R7$(6),i.Y8G("ngForOf",n.chapters))},dependencies:[d.n,s.Sq,s.bT,a.Jm,a.QW,a.W9,a.eU,a.iq,a.uz,a.he,a.nf,a.BC,a.ai,c.t,l.B,m.i,r.T,p.D9],styles:[".addon-mod-book-bullet[_ngcontent-%COMP%]{font-weight:700;font-size:1.5em;margin-right:3px}"]}),AddonModBookTocComponent})()}}]);