import{a as u}from"./chunk-JSG72ZNQ.js";import{La as d,Ma as p}from"./chunk-QHAVDXDG.js";import{$ as f,aa as h,q as m}from"./chunk-27KSTDMK.js";import{z as o}from"./chunk-GQAU5ACB.js";import{Bb as i,Ea as n,Ib as c,qa as r,yd as l}from"./chunk-ISMRT7VU.js";var S=(()=>{class s{constructor(t,e,a,b){this.fb=t,this.data=e,this.drawerRef=a,this.cdr=b,this.icons=p,this.filtersForm=this.buildForm(),this.localizationService=r(d),this.destroyRef=r(n)}ngOnInit(){this._initialValue=this.filtersForm.value,this._setupFilters(),this._initSub(),this._initResetFormSub()}_initSub(){this.filtersForm.valueChanges.pipe(o(this.destroyRef)).subscribe(t=>{let e=u(this._initialValue,t)?null:t;this.drawerRef.submitData$$.next(e)})}_setupFilters(){this.data.filters&&(this.drawerRef.submitData$$.next(this.data.filters),this.filtersForm.patchValue(this.patchValue()))}_initResetFormSub(){this.drawerRef.instance?.canceled.pipe(o(this.destroyRef)).subscribe(()=>{this.filtersForm.reset(),this.cdr.detectChanges()})}static{this.\u0275fac=function(e){return new(e||s)(i(m),i(h),i(f),i(l))}}static{this.\u0275cmp=c({type:s,selectors:[["tis-base-table-view"]],decls:0,vars:0,template:function(e,a){},encapsulation:2})}}return s})();export{S as a};
//# sourceMappingURL=chunk-BTZM7RHX.js.map
