import{iW as m,ao as s,aO as B,aq as c,cb as j,ci as a,ax as k,e9 as M,bN as D,L as N,az as p,aj as L,bu as v,c4 as F,iO as J,m as O,v as R}from"./app-k0jcl5PQ.js";import{B as q}from"./kkYLrCf4.chunk.js";import{B as r}from"./BrF8vp1I.chunk.js";import{W as I}from"./BwaXQJMJ.chunk.js";import{u as P,a as W}from"./DaGep5vp.chunk.js";import{u as w}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 i="userManager.bulkUserActionsDeleteConfirmation";function V(e){m.useSetWizardConfirmationCallback(e.onClickConfirm);const t=(e.countsByStatus.Disabled??0)+(e.countsByStatus.Inactive??0);return s.jsxs(B.Provider,{value:i,children:[s.jsxs(I,{children:[s.jsx("p",{className:"fw-semibold",children:s.jsx(c,{namespace:i,phrase:e.userType===j.Learner?"deleteStudents":"deleteStaff",options:{smartCount:t}})}),s.jsxs("ul",{className:"ms-3 ps-1 my-2",children:[s.jsx("li",{children:s.jsx(c,{namespace:i,phrase:"info1"})}),s.jsx("li",{className:"text-danger",children:s.jsx(c,{namespace:i,phrase:"info2"})})]}),s.jsx(r,{userType:e.userType,countsByStatus:e.countsByStatus,changeTo:{[a.Active]:r.Outcomes.NoChange,[a.Disabled]:r.Outcomes.Deleted,[a.Inactive]:r.Outcomes.Deleted},disabled:!0})]}),s.jsx(q,{users:e.users,statuses:[a.Inactive,a.Disabled],imageCdnUrl:e.imageCdnUrl,hasMore:e.hasMoreUsers,isFetching:e.isFetchingUsers,fetchNext:e.fetchNextUserPage,userType:e.userType,userCount:t})]})}const K="userManager.bulkDeleteConfirmation";function pe(e){var f;const{users:t,count:l,isFetching:h,hasMore:C,fetchNext:U}=P(e.userType),[g]=k(M.BULK_USER_ACTIONS);D({title:N.getPhrase(K,"pageTitle")});const y=p(L.currentUser()),n=p(v.config()),o=w({userType:e.userType,field:E.UserProfilesStatus,getSearchAggregation:z.getSearchAggregation}),x=F(),d=J(e.userType),b=m.useCreateJobErrorAlert();function S(){if(!g)return;const u=m.getCreateJobRequestData(g,y.data.customerId,e.userType);O(x,H.createJob(u,A,b))}function A(u){R.trigger({...d.bulkActionsStatus.polling,params:{userType:e.userType,jobId:u.id}})}const T=!!n.data&&!!o;return s.jsx(W,{appLinks:d,userType:e.userType,users:t,currentStep:"confirmation",userCount:l,loaded:T,children:!!n.data&&o&&s.jsx(V,{users:t,imageCdnUrl:(f=n.data)==null?void 0:f.imageCdnUrl,hasMoreUsers:C,isFetchingUsers:h,fetchNextUserPage:U,userType:e.userType,onClickConfirm:S,userCount:l,countsByStatus:o})})}export{pe as BulkUserActionsDeleteConfirmationView};
//# sourceMappingURL=CzGiw43E.chunk.js.map
