"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[89030],{89030:(i,n,e)=>{e.r(n),e.d(n,{AddonModWikiSubwikiPickerComponent:()=>_});var t=e(79555),o=e(86654),c=e(54438),r=e(60177),d=e(2910),k=e(86198),u=e(58197),s=e(88246);function AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_divider_1_Template(i,n){if(1&i&&(c.j41(0,"ion-item-divider")(1,"ion-label")(2,"p",3),c.nrm(3,"core-format-text",4),c.k0s()()()),2&i){const i=c.XpG().$implicit,n=c.XpG();c.R7$(3),c.Y8G("text",i.label)("contextInstanceId",n.courseId)("wsNotFiltered",!0)}}function AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_2_ion_icon_3_Template(i,n){1&i&&c.nrm(0,"ion-icon",7)}function AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_2_Template(i,n){if(1&i){const i=c.RV6();c.j41(0,"ion-item",5),c.bIt("click",(function AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_2_Template_ion_item_click_0_listener(){const n=c.eBV(i).$implicit,e=c.XpG(2);return c.Njj(e.openSubwiki(n))})),c.j41(1,"ion-label"),c.nrm(2,"core-format-text",4),c.k0s(),c.DNE(3,AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_2_ion_icon_3_Template,1,0,"ion-icon",6),c.k0s()}if(2&i){const i=n.$implicit,e=c.XpG(2);c.Y8G("detail",!1),c.BMQ("aria-current",e.isSubwikiSelected(i)?"page":"false"),c.R7$(2),c.Y8G("text",i.name)("contextInstanceId",e.courseId)("wsNotFiltered",!0),c.R7$(),c.Y8G("ngIf",e.isSubwikiSelected(i))}}function AddonModWikiSubwikiPickerComponent_ng_container_2_Template(i,n){if(1&i&&(c.qex(0),c.DNE(1,AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_divider_1_Template,4,3,"ion-item-divider",1)(2,AddonModWikiSubwikiPickerComponent_ng_container_2_ion_item_2_Template,4,6,"ion-item",2),c.bVm()),2&i){const i=n.$implicit;c.R7$(),c.Y8G("ngIf",i.label),c.R7$(),c.Y8G("ngForOf",i.subwikis)}}let _=(()=>{var i;class AddonModWikiSubwikiPickerComponent{constructor(){this.subwikis=[]}isSubwikiSelected(i){return i.id>0&&this.currentSubwiki.id>0?i.id===this.currentSubwiki.id:i.userid===this.currentSubwiki.userid&&i.groupid===this.currentSubwiki.groupid}openSubwiki(i){i!==this.currentSubwiki&&t.IE.dismiss(i)}}return(i=AddonModWikiSubwikiPickerComponent).ɵfac=function AddonModWikiSubwikiPickerComponent_Factory(n){return new(n||i)},i.ɵcmp=c.VBU({type:i,selectors:[["addon-mod-wiki-subwiki-picker"]],inputs:{courseId:"courseId",subwikis:"subwikis",currentSubwiki:"currentSubwiki"},standalone:!0,features:[c.aNF],decls:3,vars:1,consts:[[4,"ngFor","ngForOf"],[4,"ngIf"],["class","ion-text-wrap","button","",3,"detail","click",4,"ngFor","ngForOf"],[1,"item-heading"],["contextLevel","course",3,"text","contextInstanceId","wsNotFiltered"],["button","",1,"ion-text-wrap",3,"click","detail"],["name","fas-check","slot","end","aria-hidden","true",4,"ngIf"],["name","fas-check","slot","end","aria-hidden","true"]],template:function AddonModWikiSubwikiPickerComponent_Template(i,n){1&i&&(c.j41(0,"ion-content")(1,"ion-list"),c.DNE(2,AddonModWikiSubwikiPickerComponent_ng_container_2_Template,3,2,"ng-container",0),c.k0s()()),2&i&&(c.R7$(2),c.Y8G("ngForOf",n.subwikis))},dependencies:[o.n,r.Sq,r.bT,d.W9,d.iq,d.uz,d.Dg,d.he,d.nf,k.t,u.B,s.i],encapsulation:2}),AddonModWikiSubwikiPickerComponent})()}}]);