1import {m}from'./chunk-Cc2nMWOC.js';import {E as En,D as De}from'./chunk-D3crpTkA.js';import {f}from'./chunk-CjNSgPDz.js';import {h as he}from'./chunk-C2EVnWPI.js';import'./chunk-CC_dzDIF.js';import {c as ce}from'./chunk-Cha4_V9g.js';import'./chunk-yuXVPJRt.js';import {c8 as Xr,H,bQ as P,K as Kb,k as Kv,x as xM,T as Tt$1,P as Pg,V as Vg,l as b0,L as L0,Y as Yx,m as dn,n as Vw,o as nk,t as td,p as tC,q as bC,s as sv,N as NC,X as XC,_ as _D,aO as oD,aP as lD,b0 as mD,aX as sD,r as il,u as XD,v as rM,F as Fb,w as t1,y as A1,z as gS,B as Vs,J as NS,Z as ZS,M as EI,Q as us,R as ms,S as HI,U as ZI,$ as Dn,a0 as kE,a1 as Jv,a2 as go,a3 as qd,a4 as YE,a5 as OT,a6 as lA,b4 as HM,cA as zM,a7 as mt,a8 as cy,aa as Xs,ac as V_,ad as hd,ae as fS,aB as Qm,ab as my,ai as ay,bC as tS,ag as _C,ak as Dd,al as hS,aj as ky,aT as l_,bg as gS$1,bm as Vg$1}from'./main-CTPND76J.js';import'./chunk-CAH8VGMK.js';var Pt=()=>["Work the list from the top; it is ordered by how much attention each client needs.","Open a client to see exactly which features are unused or unconfigured."],Tt=()=>[10,25,50];function wt(e,o){if(e&1&&(Xs(0,"a",10),V_(1),hd()),e&2){let t=o.$implicit;ay("href","/admin/clients/client-profile/"+t.clientId,Vg$1),_C(),Dd(" ",t.businessName||t.clientId," ");}}function Dt(e,o){if(e&1&&(Xs(0,"strong"),V_(1),hd()),e&2){let t=o.$implicit;_C(),ky(t.healthScore);}}function It(e,o){if(e&1&&(Xs(0,"span",11),V_(1),hd()),e&2){let t=o.$implicit,i=l_();ay("ngClass",i.getHealthStatusClass(t.healthScore)),_C(),Dd(" ",t.healthStatusLabel," ");}}function kt(e,o){if(e&1&&V_(0),e&2){let t=o.$implicit;Dd(" ",t.topRecommendation," ");}}function Ot(e,o){if(e&1&&(Xs(0,"span",11),V_(1),fS(2,"titlecase"),hd()),e&2){let t=o.$implicit,i=l_();ay("ngClass",i.getSeverityClass(t.severity)),_C(),Dd(" ",hS(2,2,t.severity)," ");}}function Lt(e,o){if(e&1&&V_(0),e&2){let t=o.$implicit;Dd(" ",t.unresolvedRecommendationCount," ");}}function Rt(e,o){if(e&1&&(V_(0),fS(1,"date")),e&2){let t=o.$implicit;Dd(" ",gS$1(1,1,t.lastActivityDate,"mediumDate")," ");}}var Oe=(()=>{class e{constructor(t,i){this.healthService=t,this.loadingService=i,this.items=[],this.loading=true,this.totalCount=0,this.pageSize=10,this.pageIndex=0,this.columns=[{key:"businessName",label:"Business",priority:1},{key:"healthScore",label:"Score",priority:1},{key:"healthStatusLabel",label:"Status",priority:1},{key:"topRecommendation",label:"Top Recommendation",priority:2},{key:"severity",label:"Severity",priority:2},{key:"unresolvedRecommendationCount",label:"Unresolved",priority:3},{key:"lastActivityDate",label:"Last Activity",priority:3}],this.subs=[];}ngOnInit(){this.load();}ngOnDestroy(){this.subs.forEach(t=>t.unsubscribe());}load(){this.loading=true,this.loadingService.beginSuppress();let t=this.healthService.getClientsActionList(this.pageIndex+1,this.pageSize).pipe(Xr(()=>{this.loading=false,this.loadingService.endSuppress();})).subscribe({next:i=>{i.succeeded&&(this.items=i.data,this.totalCount=i.count??0);},error:()=>{}});this.subs.push(t);}onPage(t){this.pageIndex=t.pageIndex,this.pageSize=t.pageSize,this.load();}getSeverityColor(t){switch(t){case "Critical":return "var(--status-fail, #f44336)";case "Warning":return "var(--status-warn, #ff9800)";default:return "var(--sl-blue, #2196f3)"}}getHealthStatusClass(t){return t>=80?"badge-excellent":t>=60?"badge-good":t>=40?"badge-fair":"badge-poor"}getSeverityClass(t){switch(t){case "Critical":return "badge-critical";case "Warning":return "badge-warning";default:return "badge-info"}}static{this.\u0275fac=function(i){return new(i||e)(H(m),H(P))};}static{this.\u0275cmp=Kb({type:e,selectors:[["app-admin-action-list"]],decls:18,vars:11,consts:[["helpKey","admin-client-health-actions","intro","Clients whose account health says they need help \u2014 under-using what they pay for, or not set up properly.",3,"steps"],[3,"dataSource","columns","loading"],["rtColumnDef","businessName"],["rtColumnDef","healthScore"],["rtColumnDef","healthStatusLabel"],["rtColumnDef","topRecommendation"],["rtColumnDef","severity"],["rtColumnDef","unresolvedRecommendationCount"],["rtColumnDef","lastActivityDate"],[3,"page","length","pageSizeOptions"],["target","_blank",1,"f-w-600","text-primary",3,"href"],[1,"status-badge",3,"ngClass"]],template:function(i,p){i&1&&(cy(0,"app-page-help",0),Xs(1,"mat-card")(2,"mat-card-header")(3,"mat-card-title")(4,"mat-icon"),V_(5,"admin_panel_settings"),hd(),V_(6),fS(7,"translate"),hd()(),Xs(8,"mat-card-content")(9,"app-responsive-table",1),Qm(10,wt,2,2,"ng-template",2)(11,Dt,2,1,"ng-template",3)(12,It,2,2,"ng-template",4)(13,kt,1,1,"ng-template",5)(14,Ot,3,4,"ng-template",6)(15,Lt,1,1,"ng-template",7)(16,Rt,2,4,"ng-template",8),hd(),Xs(17,"paginator-configurable",9),my("page",function(At){return p.onPage(At)}),hd()()()),i&2&&(ay("steps",tS(9,Pt)),_C(6),Dd(" ",hS(7,7,"Clients Needing Attention")," "),_C(3),ay("dataSource",p.items)("columns",p.columns)("loading",p.loading),_C(8),ay("length",p.totalCount)("pageSizeOptions",tS(10,Tt)));},dependencies:[ce,Kv,xM,Tt$1,En,De,f,he,Pg,Vg,b0,L0,Yx,dn,Vw,nk,td,tC,bC,sv,NC,XC,_D,oD,lD,mD,sD,il,XD,rM,Fb,t1,A1,gS,Vs,NS,ZS,EI,us,ms,HI,ZI,Dn,kE,Jv,go,qd,YE,OT,lA,HM,zM,mt],styles:["[_nghost-%COMP%]{display:block;padding:24px}table[_ngcontent-%COMP%]{width:100%}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:var(--radius-xl);font-size:var(--font-size-xs);font-weight:600;line-height:1.4;white-space:nowrap}.badge-excellent[_ngcontent-%COMP%]{background-color:#e6fffa;color:var(--color-primary-dark)}.badge-good[_ngcontent-%COMP%]{background-color:#e6fbf7;color:#1565c0}.badge-fair[_ngcontent-%COMP%]{background-color:#fef5e5;color:#e65100}.badge-poor[_ngcontent-%COMP%], .badge-critical[_ngcontent-%COMP%]{background-color:#fdede8;color:var(--color-error-text)}.badge-warning[_ngcontent-%COMP%]{background-color:#fef5e5;color:#e65100}.badge-info[_ngcontent-%COMP%]{background-color:#e6fbf7;color:#1565c0}a.text-primary[_ngcontent-%COMP%]{text-decoration:none}a.text-primary[_ngcontent-%COMP%]:hover{text-decoration:underline}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}mat-card-header[_ngcontent-%COMP%]{display:flex;align-items:center}"],changeDetection:1});}}return e})();export{Oe as AdminActionListComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.