"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[57503],{57503:(o,e,t)=>{t.r(e),t.d(e,{AddonModDataFieldRadiobuttonComponent:()=>_});var n=t(10093),a=t(86654),d=t(54438),i=t(60177),r=t(89417),l=t(2910),s=t(25880),p=t(17778),c=t(58197),u=t(73955);const _c0=o=>({header:o});function AddonModDataFieldRadiobuttonComponent_span_0_span_1_Template(o,e){if(1&o&&d.nrm(0,"span",8),2&o){const o=d.XpG(2);d.Y8G("core-mark-required",o.field.required)}}function AddonModDataFieldRadiobuttonComponent_span_0_ion_select_option_6_Template(o,e){1&o&&(d.j41(0,"ion-select-option",9),d.EFF(1),d.nI1(2,"translate"),d.k0s()),2&o&&(d.R7$(),d.JRh(d.bMT(2,1,"addon.mod_data.menuchoose")))}function AddonModDataFieldRadiobuttonComponent_span_0_ion_select_option_7_Template(o,e){if(1&o&&(d.j41(0,"ion-select-option",10),d.nrm(1,"core-format-text",11),d.k0s()),2&o){const o=e.$implicit,t=d.XpG(2);d.Y8G("value",o),d.R7$(),d.Y8G("text",o)("contextInstanceId",null==t.database?null:t.database.coursemodule)("courseId",null==t.database?null:t.database.course)("wsNotFiltered",!0)}}function AddonModDataFieldRadiobuttonComponent_span_0_core_input_errors_8_Template(o,e){if(1&o&&d.nrm(0,"core-input-errors",12),2&o){const o=d.XpG(2);d.Y8G("control",o.form.controls["f_"+o.field.id])("errorText",o.error)}}function AddonModDataFieldRadiobuttonComponent_span_0_Template(o,e){if(1&o&&(d.j41(0,"span",2),d.DNE(1,AddonModDataFieldRadiobuttonComponent_span_0_span_1_Template,1,1,"span",3),d.j41(2,"ion-select",4),d.nI1(3,"translate"),d.nI1(4,"translate"),d.nI1(5,"translate"),d.DNE(6,AddonModDataFieldRadiobuttonComponent_span_0_ion_select_option_6_Template,3,3,"ion-select-option",5)(7,AddonModDataFieldRadiobuttonComponent_span_0_ion_select_option_7_Template,2,5,"ion-select-option",6),d.k0s(),d.DNE(8,AddonModDataFieldRadiobuttonComponent_span_0_core_input_errors_8_Template,1,2,"core-input-errors",7),d.k0s()),2&o){const o=d.XpG();d.Y8G("formGroup",o.form),d.R7$(),d.Y8G("ngIf",o.editMode),d.R7$(),d.Y8G("formControlName","f_"+o.field.id)("placeholder",d.bMT(3,10,"addon.mod_data.menuchoose"))("cancelText",d.bMT(4,12,"core.cancel"))("okText",d.bMT(5,14,"core.ok"))("interfaceOptions",d.eq3(16,_c0,o.field.name)),d.R7$(4),d.Y8G("ngIf",!o.editMode||!o.field.required),d.R7$(),d.Y8G("ngForOf",o.options),d.R7$(),d.Y8G("ngIf",o.error&&o.editMode)}}function AddonModDataFieldRadiobuttonComponent_span_1_Template(o,e){if(1&o&&(d.j41(0,"span"),d.EFF(1),d.k0s()),2&o){const o=d.XpG();d.R7$(),d.JRh(o.value.content)}}let _=(()=>{var o;class AddonModDataFieldRadiobuttonComponent extends n.u{constructor(){super(...arguments),this.options=[]}init(){if(this.displayMode)return;let o;this.options=this.field.param1.split("\n"),this.options=this.options.filter((o=>""!==o)),this.editMode&&this.value&&(o=this.value.content),this.addControl(`f_${this.field.id}`,o)}}return(o=AddonModDataFieldRadiobuttonComponent).ɵfac=(()=>{let e;return function AddonModDataFieldRadiobuttonComponent_Factory(t){return(e||(e=d.xGo(o)))(t||o)}})(),o.ɵcmp=d.VBU({type:o,selectors:[["addon-mod-data-field-radiobutton"]],standalone:!0,features:[d.Vt3,d.aNF],decls:2,vars:2,consts:[[3,"formGroup",4,"ngIf"],[4,"ngIf"],[3,"formGroup"],["class","core-mark-required",3,"core-mark-required",4,"ngIf"],["interface","alert",3,"formControlName","placeholder","cancelText","okText","interfaceOptions"],["value","",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"control","errorText",4,"ngIf"],[1,"core-mark-required",3,"core-mark-required"],["value",""],[3,"value"],["contextLevel","module",3,"text","contextInstanceId","courseId","wsNotFiltered"],[3,"control","errorText"]],template:function AddonModDataFieldRadiobuttonComponent_Template(o,e){1&o&&d.DNE(0,AddonModDataFieldRadiobuttonComponent_span_0_Template,9,18,"span",0)(1,AddonModDataFieldRadiobuttonComponent_span_1_Template,2,1,"span",1),2&o&&(d.Y8G("ngIf",e.inputMode&&e.form),d.R7$(),d.Y8G("ngIf",e.displayMode&&e.value&&e.value.content))},dependencies:[a.n,i.Sq,i.bT,r.BC,r.cb,l.Nm,l.Ip,l.Je,r.j4,r.JD,s.q,p.j,c.B,u.D9],encapsulation:2}),AddonModDataFieldRadiobuttonComponent})()}}]);