import{j as e,b7 as t,bT as g,ck as s,b_ as p,b$ as b,el as x}from"./app-BgLa5dit.js";import{W as f}from"./C16qNPRj.chunk.js";import{R as v}from"./CetbvyBn.chunk.js";const C="_disabledInfoContainer_x6m19_1",S="_badge_x6m19_4",_="_pending_x6m19_9",c={disabledInfoContainer:C,badge:S,pending:_},a="userManager.bulkUserActionsCountByStatus";function m(){return e.jsx(f,{children:e.jsx(t,{namespace:a,phrase:"active"})})}function j(){return e.jsx("div",{className:`badge bg-danger ${c.badge}`,children:e.jsx(t,{namespace:a,phrase:"deactivated"})})}function y(){return e.jsx("div",{children:e.jsx(t,{namespace:a,phrase:"noChange"})})}function D(){return e.jsx("div",{children:e.jsx(t,{namespace:a,phrase:"emailSent"})})}function N(){return e.jsx("div",{children:e.jsx(t,{namespace:a,phrase:"noEmailSentDisabled"})})}function T(){return e.jsx("div",{children:e.jsx(t,{namespace:a,phrase:"noEmailSent"})})}function A(){return e.jsx("div",{className:`badge bg-gray-500 ${c.badge} ${c.pending}`,children:e.jsx(t,{namespace:a,phrase:"pending"})})}function E(){return e.jsx("div",{className:`badge bg-dark ${c.badge}`,children:e.jsx(t,{namespace:a,phrase:"deleted"})})}function I(){return e.jsx("div",{className:`badge bg-dark ${c.badge}`,children:e.jsx(t,{namespace:a,phrase:"removed"})})}function $(n){switch(n.status){case s.Active:return e.jsx(m,{});case s.Disabled:return e.jsx(j,{});case s.Inactive:return e.jsx(A,{})}p.throw(new b("Object status not mapped"))}function l(n){return e.jsxs(e.Fragment,{children:[e.jsx($,{status:n.status}),e.jsx("div",{children:e.jsx(t,{namespace:a,phrase:n.userType===g.Staff?"staffCount":"studentCount",options:{smartCount:n.countsByStatus[n.status]??0}})})]})}const h="userManager.bulkUserActionsCountByStatus";function B(n){const{userType:o,changeTo:i,countsByStatus:r}=n,u=[{left:e.jsx(t,{namespace:h,phrase:"statuses"}),right:e.jsx(t,{namespace:h,phrase:"outcome"})}];if(r[s.Active]){const d=i[s.Active];u.push({left:e.jsx(l,{userType:o,status:s.Active,countsByStatus:r}),right:e.jsx(d,{})})}if(r[s.Disabled]){const d=i[s.Disabled];u.push({left:e.jsx(l,{userType:o,status:s.Disabled,countsByStatus:r}),right:e.jsx(d,{})})}if(r[s.Inactive]){const d=i[s.Inactive];u.push({left:e.jsx(l,{userType:o,status:s.Inactive,countsByStatus:r}),right:e.jsx(d,{})})}return u}k.Outcomes={Active:m,Deactivated:j,Deleted:E,NoChange:y,EmailSent:D,NoEmailSentDisabled:N,NoEmailSent:T,Removed:I};function k(n){const o=B(n);return e.jsx("div",{className:`p-2 rounded ${n.disabled?c.disabledInfoContainer:"border"}`,children:o.map((i,r)=>e.jsxs(v,{className:"mb-2",children:[e.jsx(x,{xs:4,children:i.left}),e.jsx(x,{xs:8,children:i.right})]},r))})}export{k as B};
//# sourceMappingURL=BXi1HfY0.chunk.js.map
