import{ax as A,e9 as h,aI as d,i$ as b,cb as S,ao as t,aO as T,aq as x,aQ as l,L as g,aT as m,iO as f,bN as k}from"./app-k0jcl5PQ.js";import{B as v}from"./bUngC6nU.chunk.js";import{u as B,a as j}from"./DaGep5vp.chunk.js";import{u as C}from"./VKSuH0OD.chunk.js";import{U,A as N}from"./9ls1F1Ve.chunk.js";import"./BrF8vp1I.chunk.js";import"./BgdsWk2A.chunk.js";import"./BlKMjFEf.chunk.js";import"./CpGXOT1_.chunk.js";import"./DkDkjje4.chunk.js";import"./Djb1f-EX.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./CnmbO5oy.chunk.js";import"./fstW5ZQE.chunk.js";const D="_radioFilter_67cw2_1",p={radioFilter:D},y="userManager.bulkUserActionsActivationActionDetails",n=g.encloseNamespace(y);function L(e){const[s,i]=A(h.BULK_USER_ACTIONS),{setDisableNext:c}=d.useContext(b),a=s==null?void 0:s.subAction,r=!e.countsByStatus.Active,o=!e.countsByStatus.Disabled;d.useEffect(()=>{c(!(a==="deactivate"||a==="reactivate"))},[a]);const u=e.userType===S.Learner;return t.jsxs(T.Provider,{value:y,children:[t.jsx("h2",{className:"h4 mb-3",children:t.jsx(x,{phrase:"heading"})}),t.jsxs("div",{className:`p-2 border rounded mb-2 ${a==="deactivate"?"border-info":""}`,children:[t.jsx(l,{title:r?n("deactivateDisabledTooltip"):"",spanHack:!0,spanHackClassName:"",children:t.jsx(m.Check,{type:"radio",label:n(u?"deactivateStudents":"deactivateStaff",{smartCount:e.countsByStatus.Active??0}),name:"deactivate",id:"deactivate",value:"deactivate",onChange:()=>i("subAction","deactivate"),checked:a==="deactivate",className:p.radioFilter,disabled:r})}),a==="deactivate"&&t.jsx(v,{type:"deactivate",userType:e.userType,countsByStatus:e.countsByStatus})]}),t.jsxs("div",{className:`p-2 border rounded mb-3 ${a==="reactivate"?"border-info":""}`,children:[t.jsx(l,{title:o?n("activateDisabledTooltip"):"",spanHack:!0,spanHackClassName:"",children:t.jsx(m.Check,{type:"radio",label:n(u?"reactivateStudents":"reactivateStaff",{smartCount:e.countsByStatus.Disabled??0}),name:"reactivate",id:"reactivate",value:"reactivate",onChange:()=>i("subAction","reactivate"),checked:a==="reactivate",className:p.radioFilter,disabled:o})}),a==="reactivate"&&t.jsx(v,{type:"reactivate",userType:e.userType,countsByStatus:e.countsByStatus})]})]})}const F="userManager.bulkActivationDetails";function Q(e){const{users:s,count:i}=B(e.userType),c=f(e.userType);k({title:g.getPhrase(F,"pageTitle")});const a=C({userType:e.userType,field:N.UserProfilesStatus,getSearchAggregation:U.getSearchAggregation}),r=!!a;return t.jsx(j,{appLinks:c,userType:e.userType,users:s,currentStep:"action-details",userCount:i,loaded:r,children:!!r&&t.jsx(L,{appLinks:c,userType:e.userType,userCount:i,countsByStatus:a})})}export{Q as BulkUserActionsActivationActionDetailsView};
//# sourceMappingURL=CTK7WlFi.chunk.js.map
