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