"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[76142],{76142:(e,o,n)=>{n.r(o),n.d(o,{AddonUserProfileFieldCheckboxComponent:()=>_});var t=n(89417),r=n(25266),i=n(81690),l=n(86654),d=n(54438),c=n(60177),s=n(2910),a=n(25880),m=n(17778),p=n(58197),f=n(73955);function AddonUserProfileFieldCheckboxComponent_ion_item_0_p_4_Template(e,o){1&e&&(d.j41(0,"p"),d.EFF(1),d.nI1(2,"translate"),d.k0s()),2&e&&(d.R7$(),d.SpI(" ",d.bMT(2,1,"core.yes")," "))}function AddonUserProfileFieldCheckboxComponent_ion_item_0_p_5_Template(e,o){1&e&&(d.j41(0,"p"),d.EFF(1),d.nI1(2,"translate"),d.k0s()),2&e&&(d.R7$(),d.SpI(" ",d.bMT(2,1,"core.no")," "))}function AddonUserProfileFieldCheckboxComponent_ion_item_0_Template(e,o){if(1&e&&(d.j41(0,"ion-item")(1,"ion-label")(2,"p",2),d.nrm(3,"core-format-text",3),d.k0s(),d.DNE(4,AddonUserProfileFieldCheckboxComponent_ion_item_0_p_4_Template,3,3,"p",0)(5,AddonUserProfileFieldCheckboxComponent_ion_item_0_p_5_Template,3,3,"p",0),d.k0s()()),2&e){const e=d.XpG();d.R7$(3),d.Y8G("text",e.field.name)("contextLevel",e.contextLevel)("contextInstanceId",e.contextInstanceId)("courseId",e.courseId)("wsNotFiltered",!0),d.R7$(),d.Y8G("ngIf","0"!==e.value),d.R7$(),d.Y8G("ngIf","0"===e.value)}}function AddonUserProfileFieldCheckboxComponent_ion_item_1_Template(e,o){if(1&e&&(d.j41(0,"ion-item",4)(1,"ion-checkbox",5)(2,"span",6),d.nrm(3,"core-format-text",3),d.k0s()(),d.nrm(4,"core-input-errors",7),d.k0s()),2&e){const e=d.XpG();d.Y8G("formGroup",e.form),d.R7$(),d.Y8G("formControlName",e.modelName),d.R7$(),d.Y8G("core-mark-required",e.required),d.R7$(),d.Y8G("text",e.field.name)("contextLevel",e.contextLevel)("contextInstanceId",e.contextInstanceId)("courseId",e.courseId)("wsNotFiltered",!0),d.R7$(),d.Y8G("control",e.form.controls[e.modelName])}}let _=(()=>{var e;class AddonUserProfileFieldCheckboxComponent extends r.k{createFormControl(e){const o={value:i.j.isTrueOrOne(e.defaultdata),disabled:this.disabled};return new t.MJ(o,{validators:this.required&&!e.locked?t.k0.requiredTrue:null,nonNullable:!0})}}return(e=AddonUserProfileFieldCheckboxComponent).ɵfac=(()=>{let o;return function AddonUserProfileFieldCheckboxComponent_Factory(n){return(o||(o=d.xGo(e)))(n||e)}})(),e.ɵcmp=d.VBU({type:e,selectors:[["addon-user-profile-field-checkbox"]],standalone:!0,features:[d.Vt3,d.aNF],decls:2,vars:2,consts:[[4,"ngIf"],[3,"formGroup",4,"ngIf"],[1,"item-heading"],[3,"text","contextLevel","contextInstanceId","courseId","wsNotFiltered"],[3,"formGroup"],["labelPlacement","start","justify","space-between",3,"formControlName"],[3,"core-mark-required"],[3,"control"]],template:function AddonUserProfileFieldCheckboxComponent_Template(e,o){1&e&&d.DNE(0,AddonUserProfileFieldCheckboxComponent_ion_item_0_Template,6,7,"ion-item",0)(1,AddonUserProfileFieldCheckboxComponent_ion_item_1_Template,5,9,"ion-item",1),2&e&&(d.Y8G("ngIf",!o.edit&&o.field&&o.field.name),d.R7$(),d.Y8G("ngIf",o.edit&&o.field&&o.field.shortname&&o.form))},dependencies:[l.n,c.bT,t.BC,t.cb,s.eY,s.uz,s.he,s.hB,t.j4,t.JD,a.q,m.j,p.B,f.D9],styles:["[_nghost-%COMP%]{--text-overflow: initial;--white-space: normal}[_nghost-%COMP%]   .item-heading[_ngcontent-%COMP%]{white-space:normal}[_nghost-%COMP%]   ion-label[_ngcontent-%COMP%]{padding-inline-end:.5rem}[_nghost-%COMP%]   ion-label[_ngcontent-%COMP%]   .label-text[_ngcontent-%COMP%]{text-overflow:var(--text-overflow);white-space:var(--white-space)}"]}),AddonUserProfileFieldCheckboxComponent})()}}]);