import{B as h,E as C}from"./chunk-K7KAWBRR.js";import{a as p,b as g}from"./chunk-3AUKOF45.js";import{K as y,k as c}from"./chunk-HJI5FNS6.js";import{Gb as r,Ja as a,Sd as l,Tb as m,Ua as n,Vb as u}from"./chunk-XJKQ67XR.js";import{e as s}from"./chunk-SZAW6ZBW.js";var o,f=s(()=>{o=class{}});var x,w=s(()=>{l();f();g();l();C();y();x=(()=>{class e extends p{constructor(t,i=null){super(),this.onSave=new n,this.onCancel=new n,this.onDelete=new n,this.onSaveTemplate=new n,this.errorSummaryMessages=[],this.onSubmitFunction=null,this.location=i}initErrorSummary(){this.errorSummaryMessages=[]}cancel(){this.onCancel.emit(null)}back(){this.location&&this.location.back()}ngOnChanges(t){t.originalCopy&&(this.workingCopy=this.originalCopy?this.originalCopy.clone():null),t.isNew&&(this.saveButtonLabel=this.isNew?"lblAdd":"lblUpdate")}onSubmit(t){if(t.valid)if(this.onSubmitFunction){let i=new o;i.workingCopy=this.workingCopy,i.onSubmitFunction=this.onSubmitFunction,this.onSave.emit(i)}else this.onSave.emit(this.workingCopy)}hasErrors(t,i,d=!0){return i.errors&&((d?i.dirty:!1)||i.touched||t.submitted)}static{this.\u0275fac=function(i){return new(i||e)(r(h),r(c))}}static{this.\u0275dir=m({type:e,features:[u,a]})}}return e})()});export{o as a,f as b,x as c,w as d};
