import {I,B}from'./chunk-DNfAm-LC.js';import {Z as Ze,k as ki}from'./chunk-MlCfgTm-.js';import {J,c as tS,aZ as Dt,a5 as fh,a6 as pi,cI as p,c9 as qn,i as S,aV as ut,g8 as Jn,cp as Mi,H as ul,cN as g,bP as he,L as w,mr as qi,bF as EI,bU as vI,bE as ff,w as wo,N as Sr,f as QT,bg as lt,b$ as Yo,bh as at,bi as et,cc as Fn,gh as gr,gi as Sn,cB as Kt,u as R,a0 as ks,v as W_,z as vM,a2 as Uu,a3 as Py,bl as dv,bn as Z_,bB as oT,bp as QC,A as Iw,cd as Gy,c2 as iv,F as EM,a4 as Sy,bq as uv,bC as sT,br as ZC,bu as dy,gZ as jy,cA as Qi,bw as y_,bx as v_,cE as py,bz as f_,cn as Ry}from'./main-WUGO6e7n.js';function fe(n,ne){n&1&&Ry(0);}function ge(n,ne){if(n&1&&py(0,fe,1,0,"ng-container",5),n&2){let t=f_();Sy("ngTemplateOutlet",t.centerTemplate);}}var T,ie,Pe,Ce=J(()=>{tS();Dt();fh();pi();p();qn();S();Ze();ut();Jn();Mi();I();tS();ul();ut();Jn();T="boolean",ie=!1,Pe=(()=>{class n extends g{constructor(t){super(),this.translatorService=t,this.isMemberField="isMember",this.isMemberLabel="lblIsMember",this.filterSubject=new he,this.filterService=w(qi),ie||(this.filterService.register(T,(r,e)=>e==null?!0:!!r===e),ie=!0),this.isMemberOptions=[{label:this.translatorService.translate("lblYes"),value:"true"},{label:this.translatorService.translate("lblNo"),value:"false"}],this.subscribeToFilterValue();}ngAfterContentInit(){this.templates.forEach(t=>{t.getType()==="centerTemplate"&&(this.centerTemplate=t.template);});}onClearFilterClick(){this.textFilter="",this.table.filterGlobal(null,null);}onTextChange(t){this.filterSubject.next(t.target.value);}onIsMemberChange(t){t==null?this.table.filter(null,this.isMemberField,T):this.table.filter(t==="true",this.isMemberField,T);}subscribeToFilterValue(){this.filterSubject.pipe(EI(),vI(500),ff(this.destroyed$)).subscribe(t=>this.table.filterGlobal(t,"contains"));}static{this.\u0275fac=function(r){return new(r||n)(wo(Sr))};}static{this.\u0275cmp=QT({type:n,selectors:[["dvls-table-filter-assignments"]],contentQueries:function(r,e,a){if(r&1&&jy(a,Qi,4),r&2){let i;y_(i=v_())&&(e.templates=i);}},hostAttrs:["data-readonly-exempt","true"],inputs:{table:"table",isMemberField:"isMemberField",isMemberLabel:"isMemberLabel"},features:[dy],decls:13,vars:18,consts:[[1,"flex","gap-4","mb-4"],[1,"form-group"],["pInputText","",3,"onClear","ngModelChange","input","showClear","fluid","ngModel"],[1,"form-group","flex-1"],["styleClass","form-control",3,"onChange","ngModelChange","options","showClear","ngModel","placeholder"],[4,"ngTemplateOutlet"]],template:function(r,e){r&1&&(ks(0,"div",0)(1,"div",1)(2,"label"),W_(3),vM(4,"translate"),Uu(),ks(5,"input",2),Py("onClear",function(){return e.onClearFilterClick()}),dv("ngModelChange",function(i){return Z_(e.textFilter,i)||(e.textFilter=i),i}),Py("input",function(i){return e.onTextChange(i)}),Uu(),oT(),Uu(),QC(6,ge,1,1,"ng-container"),ks(7,"div",3)(8,"label"),W_(9),vM(10,"translate"),Uu(),ks(11,"p-select",4),vM(12,"translate"),Py("onChange",function(i){return e.onIsMemberChange(i.value)}),dv("ngModelChange",function(i){return Z_(e.isMember,i)||(e.isMember=i),i}),Uu(),oT(),Uu()()),r&2&&(Iw(),Gy("flex",e.centerTemplate?"1":"2"),Iw(2),iv(EM(4,12,"lblFilter")),Iw(2),Sy("showClear",!0)("fluid",!0),uv("ngModel",e.textFilter),sT(),Iw(),ZC(e.centerTemplate?6:-1),Iw(3),iv(EM(10,14,e.isMemberLabel)),Iw(2),Sy("options",e.isMemberOptions)("showClear",!0),uv("ngModel",e.isMember),Sy("placeholder",EM(12,16,"lblSelect")),sT());},dependencies:[ki,lt,Yo,at,et,Fn,gr,Sn,Kt,B,R],encapsulation:2,changeDetection:1});}}return n})();});export{Ce as C,Pe as P};