"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[18653],{18653:(e,o,t)=>{t.r(o),t.d(o,{AddonModDataFieldTextareaComponent:()=>u});var n=t(10093),a=t(88436),r=t(95209),d=t(41450),i=t(86654),p=t(54438),c=t(60177),l=t(89417),m=t(2910),s=t(25880),_=t(17778),f=t(58197);function AddonModDataFieldTextareaComponent_span_0_ion_input_1_Template(e,o){if(1&e&&p.nrm(0,"ion-input",7),2&e){const e=p.XpG(2);p.Y8G("placeholder",e.field.name)("formControlName","f_"+e.field.id)}}function AddonModDataFieldTextareaComponent_span_0_span_2_Template(e,o){if(1&e&&p.nrm(0,"span",8),2&e){const e=p.XpG(2);p.Y8G("core-mark-required",e.field.required)}}function AddonModDataFieldTextareaComponent_span_0_core_rich_text_editor_3_Template(e,o){if(1&e&&p.nrm(0,"core-rich-text-editor",9),2&e){const e=p.XpG(2);p.Y8G("control",e.form.controls["f_"+e.field.id])("placeholder",e.field.name)("name","f_"+e.field.id)("component",e.component)("componentId",e.componentId)("autoSave",!0)("contextInstanceId",e.componentId)("elementId","field_"+e.field.id)}}function AddonModDataFieldTextareaComponent_span_0_core_input_errors_4_Template(e,o){if(1&e&&p.nrm(0,"core-input-errors",10),2&e){const e=p.XpG(2);p.Y8G("control",e.form.controls["f_"+e.field.id])("errorText",e.error)}}function AddonModDataFieldTextareaComponent_span_0_Template(e,o){if(1&e&&(p.j41(0,"span",2),p.DNE(1,AddonModDataFieldTextareaComponent_span_0_ion_input_1_Template,1,2,"ion-input",3)(2,AddonModDataFieldTextareaComponent_span_0_span_2_Template,1,1,"span",4)(3,AddonModDataFieldTextareaComponent_span_0_core_rich_text_editor_3_Template,1,8,"core-rich-text-editor",5)(4,AddonModDataFieldTextareaComponent_span_0_core_input_errors_4_Template,1,2,"core-input-errors",6),p.k0s()),2&e){const e=p.XpG();p.Y8G("formGroup",e.form),p.R7$(),p.Y8G("ngIf",e.searchMode),p.R7$(),p.Y8G("ngIf",e.editMode),p.R7$(),p.Y8G("ngIf",e.editMode),p.R7$(),p.Y8G("ngIf",e.error&&e.editMode)}}function AddonModDataFieldTextareaComponent_core_format_text_1_Template(e,o){if(1&e&&p.nrm(0,"core-format-text",11),2&e){const e=p.XpG();p.Y8G("text",e.format(e.value))("component",e.component)("componentId",e.componentId)("contextInstanceId",e.componentId)("courseId",e.database.course)("sanitize",e.recordHasOffline)}}let u=(()=>{var e;class AddonModDataFieldTextareaComponent extends n.u{format(e){return e?a.CoreFileHelper.replacePluginfileUrls(e.content||"",e&&e.files||[]):""}init(){var e;if(this.component=r.$W,this.componentId=null===(e=this.database)||void 0===e?void 0:e.coursemodule,this.displayMode)return;let o;this.editMode&&(o=this.format(this.value)),this.addControl(`f_${this.field.id}`,o)}}return(e=AddonModDataFieldTextareaComponent).ɵfac=(()=>{let o;return function AddonModDataFieldTextareaComponent_Factory(t){return(o||(o=p.xGo(e)))(t||e)}})(),e.ɵcmp=p.VBU({type:e,selectors:[["addon-mod-data-field-textarea"]],standalone:!0,features:[p.Vt3,p.aNF],decls:2,vars:2,consts:[[3,"formGroup",4,"ngIf"],["contextLevel","module",3,"text","component","componentId","contextInstanceId","courseId","sanitize",4,"ngIf"],[3,"formGroup"],["type","text",3,"placeholder","formControlName",4,"ngIf"],["class","core-mark-required",3,"core-mark-required",4,"ngIf"],["contextLevel","module","ngDefaultControl","",3,"control","placeholder","name","component","componentId","autoSave","contextInstanceId","elementId",4,"ngIf"],[3,"control","errorText",4,"ngIf"],["type","text",3,"placeholder","formControlName"],[1,"core-mark-required",3,"core-mark-required"],["contextLevel","module","ngDefaultControl","",3,"control","placeholder","name","component","componentId","autoSave","contextInstanceId","elementId"],[3,"control","errorText"],["contextLevel","module",3,"text","component","componentId","contextInstanceId","courseId","sanitize"]],template:function AddonModDataFieldTextareaComponent_Template(e,o){1&e&&p.DNE(0,AddonModDataFieldTextareaComponent_span_0_Template,5,5,"span",0)(1,AddonModDataFieldTextareaComponent_core_format_text_1_Template,1,6,"core-format-text",1),2&e&&(p.Y8G("ngIf",o.inputMode&&o.form),p.R7$(),p.Y8G("ngIf",o.displayMode&&o.value))},dependencies:[i.n,c.bT,l.me,l.BC,l.cb,m.$w,m.Gw,l.j4,l.JD,s.q,_.j,f.B,d.CoreEditorRichTextEditorComponent],encapsulation:2}),AddonModDataFieldTextareaComponent})()}}]);