import{a as N}from"./chunk-2OMEXF4T.js";import{a as u}from"./chunk-44QN564A.js";import"./chunk-THKS2M3R.js";import{c as O,d as j,e as B,s as $}from"./chunk-GJIGZB63.js";import"./chunk-4LZAXRJQ.js";import"./chunk-5VDVFGVW.js";import{i as E,p as F}from"./chunk-NLMVBXFK.js";import"./chunk-KUS3L5XF.js";import{Bc as o,Cc as v,Dc as w,Eb as P,Ec as h,Fb as y,Fd as M,Ib as I,Jc as S,Kb as f,Rc as c,Sc as d,Vb as p,Zc as D,cc as a,dc as n,fa as x,la as _,nc as g,p as C,rb as i,sb as s,td as T,ud as b}from"./chunk-J476KISY.js";function A(t,l){t&1&&(a(0,"div",6)(1,"p",7),o(2),c(3,"translate"),n()()),t&2&&(i(2),v(d(3,1,"case-edit.participants.no-participants")))}function U(t,l){if(t&1&&(a(0,"li",10),o(1),n()),t&2){let e=l.$implicit;i(),w(" ",e," ")}}function q(t,l){if(t&1&&(a(0,"div")(1,"p"),o(2),c(3,"translate"),n(),a(4,"ul",8),f(5,U,2,1,"li",9),n()()),t&2){let e=g(2);i(2),h("",d(3,3,"case-edit.participants.count"),": ",e.participants.length,""),i(3),p("ngForOf",e.participants)}}function z(t,l){if(t&1&&(a(0,"div")(1,"p"),o(2),c(3,"translate"),n(),a(4,"div",5),f(5,A,4,3,"div",4)(6,q,6,5,"div",3),n()()),t&2){let e=g();i(2),h("",d(3,4,"case-edit.participants.case-number"),": ",e.currentCase.costDrvView||e.currentCase.costDrv,""),i(3),p("ngIf",e.participants.length===0),i(),p("ngIf",e.participants.length>0)}}function G(t,l){t&1&&(a(0,"div",6)(1,"p",7),o(2),c(3,"translate"),n()()),t&2&&(i(2),v(d(3,1,"case-edit.loading")))}var R=(()=>{class t extends u{constructor(e,r,m,L,V){super(),this.route=e,this.translateService=r,this.securityFeatureService=m,this.casesService=L,this.cdr=V,this.destroy$=new C,this.currentCase=null,this.isLoading=!1,this.participants=[]}ngOnInit(){console.log("CaseParticipantsTab: ngOnInit called"),this.loadCaseData()}ngOnDestroy(){console.log("CaseParticipantsTab: ngOnDestroy called"),this.destroy$.next(),this.destroy$.complete()}loadCaseData(){this.casesService.model$.pipe(x(this.destroy$)).subscribe(e=>{this.currentCase=e,this.loadParticipants(),this.cdr.detectChanges()})}loadParticipants(){this.participants=this.currentCase?.costDrvTmParticipants||[],console.log("CaseParticipantsTab: Loading participants for case:",this.currentCase?.costDrv)}saveData(){console.log("CaseParticipantsTab: Save action triggered")}refreshData(){console.log("CaseParticipantsTab: Refresh action triggered"),this.loadParticipants()}exportData(){console.log("CaseParticipantsTab: Export action triggered")}static{this.\u0275fac=function(r){return new(r||t)(s(E),s(O),s($),s(N),s(D))}}static{this.\u0275cmp=P({type:t,selectors:[["paw-case-participants"]],standalone:!1,features:[S([{provide:u,useExisting:t}]),I],decls:8,vars:5,consts:[[1,"paw-holder","paw-area-v","paw-offset-s"],[1,"paw-col"],[1,"paw-col-d","paw-offset-top-s"],[4,"ngIf"],["class","paw-text-center paw-offset-top-l",4,"ngIf"],[1,"paw-offset-top-m"],[1,"paw-text-center","paw-offset-top-l"],[1,"paw-text-secondary"],[1,"participant-list","paw-offset-top-s"],["class","participant-item",4,"ngFor","ngForOf"],[1,"participant-item"]],template:function(r,m){r&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),o(3),c(4,"translate"),n()(),a(5,"div",2),f(6,z,7,6,"div",3)(7,G,4,3,"div",4),n()()),r&2&&(i(3),v(d(4,3,"case-edit.tabs.case-participants")),i(3),p("ngIf",m.currentCase),i(),p("ngIf",!m.currentCase))},dependencies:[T,b,j],styles:[".paw-datagrid[_ngcontent-%COMP%]{height:100%;width:100%}h2[_ngcontent-%COMP%]{color:var(--theme-text-color);margin-bottom:16px}p[_ngcontent-%COMP%]{color:var(--theme-text-secondary-color)}"],changeDetection:0})}}return t})();var H=[{path:"",component:R}],rt=(()=>{class t{static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275mod=y({type:t})}static{this.\u0275inj=_({imports:[M,B,F.forChild(H)]})}}return t})();export{rt as CaseParticipantsModule};
