import{u as h,bZ as x,R as d,bT as A,j as e,bA as S,b7 as p,T as u,F as T,ao as l}from"./app-BgLa5dit.js";import{B as v}from"./z-nuCx61.chunk.js";import{W as f}from"./MEkA24R1.chunk.js";const j="_radioFilter_67cw2_1",b={radioFilter:j},m="userManager.bulkUserActionsActivationActionDetails",s=T.encloseNamespace(m);function N(t){const[i,c]=h(x.BULK_USER_ACTIONS),{setDisableNext:y}=d.useContext(f),a=i==null?void 0:i.subAction,n=!t.countsByStatus.Active,o=!t.countsByStatus.Disabled;d.useEffect(()=>{y(!(a==="deactivate"||a==="reactivate"))},[a]);const r=t.userType===A.Learner;return e.jsxs(S.Provider,{value:m,children:[e.jsx("h2",{className:"h4 mb-3",children:e.jsx(p,{phrase:"heading"})}),e.jsxs("div",{className:`p-2 border rounded mb-2 ${a==="deactivate"?"border-info":""}`,children:[e.jsx(u,{title:n?s("deactivateDisabledTooltip"):"",spanHack:!0,spanHackClassName:"",children:e.jsx(l.Check,{type:"radio",label:s(r?"deactivateStudents":"deactivateStaff",{smartCount:t.countsByStatus.Active??0}),name:"deactivate",id:"deactivate",value:"deactivate",onChange:()=>c("subAction","deactivate"),checked:a==="deactivate",className:b.radioFilter,disabled:n})}),a==="deactivate"&&e.jsx(v,{type:"deactivate",userType:t.userType,countsByStatus:t.countsByStatus})]}),e.jsxs("div",{className:`p-2 border rounded mb-3 ${a==="reactivate"?"border-info":""}`,children:[e.jsx(u,{title:o?s("activateDisabledTooltip"):"",spanHack:!0,spanHackClassName:"",children:e.jsx(l.Check,{type:"radio",label:s(r?"reactivateStudents":"reactivateStaff",{smartCount:t.countsByStatus.Disabled??0}),name:"reactivate",id:"reactivate",value:"reactivate",onChange:()=>c("subAction","reactivate"),checked:a==="reactivate",className:b.radioFilter,disabled:o})}),a==="reactivate"&&e.jsx(v,{type:"reactivate",userType:t.userType,countsByStatus:t.countsByStatus})]})]})}export{N as B};
//# sourceMappingURL=ewccU9g3.chunk.js.map
