import{iW as r,ao as t,aO as T,aq as b,cb as x,ci as k,c4 as B,ax as v,e9 as j,bN as M,L,iO as N,az as d,aj as F,bu as J,m as R,v as q}from"./app-k0jcl5PQ.js";import{B as D}from"./bUngC6nU.chunk.js";import{B as P}from"./kkYLrCf4.chunk.js";import{W}from"./BwaXQJMJ.chunk.js";import{u as w,a as z}from"./DaGep5vp.chunk.js";import{u as E}from"./VKSuH0OD.chunk.js";import{U as I,A as O}from"./9ls1F1Ve.chunk.js";import{J as H}from"./hKqzfsO4.chunk.js";import"./BrF8vp1I.chunk.js";import"./BgdsWk2A.chunk.js";import"./BlKMjFEf.chunk.js";import"./9ic7OkpL.chunk.js";import"./BDviDDog.chunk.js";import"./wCY37Ze3.chunk.js";import"./DXJ2-V8v.chunk.js";import"./2FvGdRks.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 f="userManager.bulkUserActionsDeactivationConfirmation";function V(e){r.useSetWizardConfirmationCallback(e.onClickConfirm);const s=e.countsByStatus.Active??0;return t.jsxs(T.Provider,{value:f,children:[t.jsxs(W,{children:[t.jsx("p",{className:"fw-semibold",children:t.jsx(b,{namespace:f,phrase:e.userType===x.Learner?"deactivateStudents":"deactivateStaff",options:{smartCount:s}})}),t.jsx(D,{type:"deactivate",userType:e.userType,countsByStatus:e.countsByStatus,disabled:!0})]}),t.jsx(P,{users:e.users,statuses:[k.Active],imageCdnUrl:e.imageCdnUrl,hasMore:e.hasMoreUsers,isFetching:e.isFetchingUsers,fetchNext:e.fetchNextUserPage,userType:e.userType,userCount:s})]})}const K="userManager.bulkDeactivateConfirmation";function Ue(e){var l;const{users:s,count:i,isFetching:p,hasMore:U,fetchNext:C}=w(e.userType),h=B(),[o]=v(j.BULK_USER_ACTIONS);M({title:L.getPhrase(K,"pageTitle")});const n=N(e.userType),u=d(F.currentUser()),c=d(J.config()),m=E({userType:e.userType,field:O.UserProfilesStatus,getSearchAggregation:I.getSearchAggregation}),y=r.useCreateJobErrorAlert();function A(){if(!o)return;const a=r.getCreateJobRequestData(o,u.data.customerId,e.userType,u.data);R(h,H.createJob(a,S,y))}function S(a){q.trigger({...n.bulkActionsStatus.polling,params:{userType:e.userType,jobId:a.id}})}const g=!!c.data&&!!m;return t.jsx(z,{appLinks:n,userType:e.userType,users:s,currentStep:"confirmation",userCount:i,loaded:g,children:g&&t.jsx(V,{users:s,imageCdnUrl:(l=c.data)==null?void 0:l.imageCdnUrl,hasMoreUsers:U,isFetchingUsers:p,fetchNextUserPage:C,userType:e.userType,onClickConfirm:A,userCount:i,countsByStatus:m})})}export{Ue as BulkUserActionsDeactivationConfirmationView};
//# sourceMappingURL=K2e6xPnq.chunk.js.map
