import{B as p,E as w}from"./chunk-JPHJ3OD7.js";import{a as f,b as C}from"./chunk-QGVT6DPT.js";import{K as g,i as h}from"./chunk-LDWBA6DZ.js";import{Db as n,Jb as s,Sb as l,Ub as c,Wa as u,be as m}from"./chunk-WL5U2YIT.js";import{e as a}from"./chunk-ADEKKGI2.js";var r,d=a(()=>{r=class{}});var I,S=a(()=>{m();d();C();m();w();g();I=(()=>{let e=class e extends f{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 r;i.workingCopy=this.workingCopy,i.onSubmitFunction=this.onSubmitFunction,this.onSave.emit(i)}else this.onSave.emit(this.workingCopy)}hasErrors(t,i,y=!0){return i.errors&&((y?i.dirty:!1)||i.touched||t.submitted)}};e.\u0275fac=function(i){return new(i||e)(s(p),s(h))},e.\u0275dir=l({type:e,features:[c,u]});let o=e;return o})()});export{r as a,d as b,I as c,S as d};
