import{ax as E,e9 as L,bN as R,L as A,iO as w,az as c,aj as B,bu as I,c4 as j,iW as n,ao as g,r as J,E as M,p as V,aP as C,M as x,cb as _,t as f,u as y,m as N,v as O}from"./app-k0jcl5PQ.js";import{u as W,a as D,B as F}from"./DaGep5vp.chunk.js";import{B as P}from"./CpGXOT1_.chunk.js";import{W as q}from"./BofPOOhn.chunk.js";import{u as G}from"./CAxN5LKv.chunk.js";import{J as u}from"./hKqzfsO4.chunk.js";import"./Djb1f-EX.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./CnmbO5oy.chunk.js";import"./DkDkjje4.chunk.js";import"./DIAJ896Y.chunk.js";import"./fstW5ZQE.chunk.js";const U="userManager.bulkUserActionsStatusCompleteView",s=A.encloseNamespace(U);function H(t,i,e){if(!t)return"";if(i===_.Learner)switch(t){case"delete":return s("deleteStudentsSuccess",{smartCount:e});case"removeFromSchool":return s("removeFromSchoolStudentSuccess",{smartCount:e});case"deactivate":return s("deactivateStudentsSuccess",{smartCount:e});case"reactivate":return s("reactivateStudentsSuccess",{smartCount:e});case"changeYearGroup":return s("changeYearGroupSuccess",{smartCount:e});case"yearGroupRollover":return s("yearGroupRolloverSuccess");case"addToClassroom":return s("addToClassroomSuccess",{smartCount:e});case"resetPassword":return s("resetPasswordSuccess",{smartCount:e});case"activationEmail":return s("activationEmailSuccess",{smartCount:e});default:return f.throw(new y(`Missing switch statement case for ${t} in BulkUserActionsStatusCompleteView.tsx`)),""}switch(t){case"delete":return s("deleteStaffSuccess",{smartCount:e});case"deactivate":return s("deactivateStaffSuccess",{smartCount:e});case"reactivate":return s("reactivateStaffSuccess",{smartCount:e});case"resetEmail":return s("resetEmailSuccess",{smartCount:e});case"removeFromSchool":return s("removeFromSchoolStaffSuccess",{smartCount:e});default:return f.throw(new y(`Missing switch statement case for ${t} in BulkUserActionsStatusCompleteView.tsx`)),""}}function ce(t){const{users:i,count:e}=W(t.userType),[a,b]=E(L.BULK_USER_ACTIONS);R({title:A.getPhrase(U,"pageTitle")});const m=w(t.userType),o=c(B.currentUser()),l=c(I.config()),d=c(u.getJob(t.jobId)),p=c(u.getJobSummary(t.jobId));G(d);const h=j(),T=n.useCreateJobErrorAlert();function v(){const r=n.getCreateJobRequestData(a,o.data.customerId,t.userType);N(h,u.createJob(r,k,T))}function k(r){O.trigger({...m.bulkActionsStatus.polling,params:{userType:t.userType,jobId:r.id}})}const S=!!d.data&&!!l.data&&!!o.data&&!!p.data;return g.jsx(D,{appLinks:m,userType:t.userType,users:i,currentStep:"status",userCount:e,preventNavLock:!0,disableAppLinks:!0,loaded:S,children:S&&g.jsx(q,{job:d.data,summary:p.data,objectCount:e,objectType:x.User,userType:t.userType,finishAppLink:m.userManager,imageCdnUrl:l.data.imageCdnUrl,successImageUrl:C.SUCCESS,failedImageUrl:C.WIZARD_ERROR,currentUser:o.data,onClickTryAgain:v,getResultsRequest:u.getJobResults,actionSucceededMessage:H(a==null?void 0:a.subAction,t.userType,p.data.totalSucceeded),navLockId:F,actionVerb:n.mapSubActionToVerb(a==null?void 0:a.subAction),onFinish:()=>b({}),preventLoggingAnalytics:!a,analyticsData:{action:P.getAnalyticsActionName(a)},analyticsOptions:{location:V.BulkUserActionsWizard,entity:M.User,actionType:J.BulkAction},getErrorListItem:r=>n.getErrorListItem(r,l.data.imageCdnUrl,o.data)})})}export{ce as BulkUserActionsStatusCompleteView};
//# sourceMappingURL=Bvga6w2O.chunk.js.map
