"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[23851],{23851:(e,n,o)=>{o.r(n),o.d(n,{AddonModDataFieldUrlComponent:()=>c});var t=o(10093),a=o(86654),r=o(54438),d=o(60177),l=o(89417),i=o(2910),p=o(25880),s=o(17778),u=o(23007);function AddonModDataFieldUrlComponent_span_0_span_1_Template(e,n){if(1&e&&r.nrm(0,"span",6),2&e){const e=r.XpG(2);r.Y8G("core-mark-required",e.field.required)}}function AddonModDataFieldUrlComponent_span_0_core_input_errors_3_Template(e,n){if(1&e&&r.nrm(0,"core-input-errors",7),2&e){const e=r.XpG(2);r.Y8G("control",e.form.controls["f_"+e.field.id])("errorText",e.error)}}function AddonModDataFieldUrlComponent_span_0_Template(e,n){if(1&e&&(r.j41(0,"span",2),r.DNE(1,AddonModDataFieldUrlComponent_span_0_span_1_Template,1,1,"span",3),r.nrm(2,"ion-input",4),r.DNE(3,AddonModDataFieldUrlComponent_span_0_core_input_errors_3_Template,1,2,"core-input-errors",5),r.k0s()),2&e){const e=r.XpG();r.Y8G("formGroup",e.form),r.R7$(),r.Y8G("ngIf",e.editMode),r.R7$(),r.Y8G("formControlName","f_"+e.field.id)("placeholder",e.field.name),r.R7$(),r.Y8G("ngIf",e.error&&e.editMode)}}function AddonModDataFieldUrlComponent_ng_container_1_a_1_Template(e,n){if(1&e&&(r.j41(0,"a",9),r.EFF(1),r.k0s()),2&e){const e=r.XpG(2);r.Y8G("href",e.value.content,r.B4B),r.R7$(),r.JRh(e.displayValue)}}function AddonModDataFieldUrlComponent_ng_container_1_span_2_Template(e,n){if(1&e&&(r.j41(0,"span"),r.EFF(1),r.k0s()),2&e){const e=r.XpG(2);r.R7$(),r.JRh(e.displayValue)}}function AddonModDataFieldUrlComponent_ng_container_1_Template(e,n){if(1&e&&(r.qex(0),r.DNE(1,AddonModDataFieldUrlComponent_ng_container_1_a_1_Template,2,2,"a",8)(2,AddonModDataFieldUrlComponent_ng_container_1_span_2_Template,2,1,"span",1),r.bVm()),2&e){const e=r.XpG();r.R7$(),r.Y8G("ngIf",e.autoLink),r.R7$(),r.Y8G("ngIf",!e.autoLink)}}let c=(()=>{var e;class AddonModDataFieldUrlComponent extends t.u{constructor(){super(...arguments),this.autoLink=!1,this.displayValue=""}init(){if(this.displayMode)return;let e;this.editMode&&this.value&&(e=this.value.content),this.addControl(`f_${this.field.id}`,e)}calculateShowListData(){if(!this.value||!this.value.content)return;const e=this.value.content,n=this.field.param2||this.value.content1;this.autoLink=1===parseInt(this.field.param1,10),this.displayValue=this.autoLink&&n||e}updateValue(e){super.updateValue(e),this.displayMode&&this.calculateShowListData()}}return(e=AddonModDataFieldUrlComponent).ɵfac=(()=>{let n;return function AddonModDataFieldUrlComponent_Factory(o){return(n||(n=r.xGo(e)))(o||e)}})(),e.ɵcmp=r.VBU({type:e,selectors:[["addon-mod-data-field-url"]],standalone:!0,features:[r.Vt3,r.aNF],decls:2,vars:2,consts:[[3,"formGroup",4,"ngIf"],[4,"ngIf"],[3,"formGroup"],["class","core-mark-required",3,"core-mark-required",4,"ngIf"],["type","url",3,"formControlName","placeholder"],[3,"control","errorText",4,"ngIf"],[1,"core-mark-required",3,"core-mark-required"],[3,"control","errorText"],["core-link","","capture","true",3,"href",4,"ngIf"],["core-link","","capture","true",3,"href"]],template:function AddonModDataFieldUrlComponent_Template(e,n){1&e&&r.DNE(0,AddonModDataFieldUrlComponent_span_0_Template,4,5,"span",0)(1,AddonModDataFieldUrlComponent_ng_container_1_Template,3,2,"ng-container",1),2&e&&(r.Y8G("ngIf",n.inputMode&&n.form),r.R7$(),r.Y8G("ngIf",n.displayMode&&n.value&&n.value.content))},dependencies:[a.n,d.bT,l.BC,l.cb,i.$w,i.Gw,l.j4,l.JD,p.q,s.j,u.j],encapsulation:2}),AddonModDataFieldUrlComponent})()}}]);