import{B as C,y as h}from"./chunk-A32B57A4.js";import{a as p,b as g}from"./chunk-TS62PHQY.js";import{C as y,i as c}from"./chunk-Z5RJRCWC.js";import{Eb as r,Gd as l,Ia as a,Qb as m,Sa as n,Sb as u}from"./chunk-JSJB5BKT.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};
