import{u as I,o as p,aP as h,j as d,bs as k,bq as T,br as v,aO as S,ag as E,bZ as L,bT as w,b_ as g,b$ as C,F as B,aQ as R,g as j}from"./app-BgLa5dit.js";import{u as V,B as J}from"./fZ5oUMOc.chunk.js";import{B as _}from"./BxYybc33.chunk.js";import{B as o}from"./DpUpv6rY.chunk.js";import{a as x}from"./CTNq1KmP.chunk.js";import{u as M}from"./PpGk0l1b.chunk.js";import{J as i}from"./DfIMhO3y.chunk.js";import{B as D}from"./CHg-RKg9.chunk.js";import{g as F}from"./B1ElCHu3.chunk.js";import"./MEkA24R1.chunk.js";import"./B3eOBVf8.chunk.js";import"./3nM7jLnE.chunk.js";import"./CPXlV0fg.chunk.js";import"./DJ0pq8J_.chunk.js";import"./Dr5_kWYc.chunk.js";import"./DusGkY45.chunk.js";import"./8Im-OACs.chunk.js";import"./g56uS58q.chunk.js";import"./q-IBKcuF.chunk.js";import"./DUpYPoLs.chunk.js";import"./EZim8aq-.chunk.js";import"./BD9MrUJP.chunk.js";import"./s6cGcwlA.chunk.js";import"./Zwjmkasg.chunk.js";import"./4qGb1BIY.chunk.js";import"./DnXDEnAR.chunk.js";import"./DkDkjje4.chunk.js";import"./CG7zbly5.chunk.js";import"./m4aqaK_l.chunk.js";import"./C53kfXmd.chunk.js";import"./vyqb6V0P.chunk.js";import"./BUT90D7O.chunk.js";import"./CCcwLDvu.chunk.js";import"./DDfKZ_ng.chunk.js";const O="userManager.bulkUserActionsStatusCompleteView",r=B.encloseNamespace(O);function W(e,c,t){if(!e)return"";if(c===w.Learner)switch(e){case"delete":return r("deleteStudentsSuccess",{smartCount:t});case"deactivate":return r("deactivateStudentsSuccess",{smartCount:t});case"reactivate":return r("reactivateStudentsSuccess",{smartCount:t});case"changeYearGroup":return r("changeYearGroupSuccess",{smartCount:t});case"yearGroupRollover":return r("yearGroupRolloverSuccess");case"addToClassroom":return r("addToClassroomSuccess",{smartCount:t});case"resetPassword":return r("resetPasswordSuccess",{smartCount:t});case"activationEmail":return r("activationEmailSuccess",{smartCount:t});case"removeFromSchool":return r("removeFromSchoolStudentSuccess",{smartCount:t});default:return g.throw(new C(`Missing switch statement case for ${e} in BulkUserActionsStatusCompleteView.tsx`)),""}switch(e){case"delete":return r("deleteStaffSuccess",{smartCount:t});case"deactivate":return r("deactivateStaffSuccess",{smartCount:t});case"reactivate":return r("reactivateStaffSuccess",{smartCount:t});case"resetEmail":return r("resetEmailSuccess",{smartCount:t});case"removeFromSchool":return r("removeFromSchoolStaffSuccess",{smartCount:t});default:return g.throw(new C(`Missing switch statement case for ${e} in BulkUserActionsStatusCompleteView.tsx`)),""}}function Ie(e){const{users:c,count:t}=V(e.customerId,e.userType),[s,b]=I(L.BULK_USER_ACTIONS),u=F(e.customerId,e.userType),n=p(i.getJob(e.jobId)),m=p(i.getJobSummary(e.jobId));M(n);const f=h(),A=o.useCreateJobErrorAlert();function y(){const a=o.getCreateJobRequestData(s,e.customerId,e.userType);R(f,i.createJob(a,U,A))}function U(a){j.trigger({...u.bulkActionsStatus.polling,params:{userType:e.userType,jobId:a.id}})}const l=!!n.data&&!!m.data;return d.jsx(D,{customerId:e.customerId,appLinks:u,userType:e.userType,users:c,currentStep:"status",userCount:t,preventNavLock:!0,disableAppLinks:!0,hideHeader:!0,loaded:l,children:l&&d.jsx(x,{job:n.data,summary:m.data,objectCount:t,objectType:E.User,userType:e.userType,finishAppLink:u.userManager,imageCdnUrl:ClickView.Config.Urls.ImageAPI,successImageUrl:S.Wizard.WIZARD_SUCCESS,failedImageUrl:S.Wizard.WIZARD_ERROR,onClickTryAgain:y,getResultsRequest:i.getJobResults,actionSucceededMessage:W(s==null?void 0:s.subAction,e.userType,m.data.totalSucceeded),navLockId:J,actionVerb:o.mapSubActionToVerb(s==null?void 0:s.subAction),onFinish:()=>b({}),preventLoggingAnalytics:!s,analyticsData:{action:_.getAnalyticsActionName(s)},analyticsOptions:{location:v.BulkUserActionsWizard,entity:T.User,actionType:k.BulkAction},getErrorListItem:a=>o.getErrorListItem(a,ClickView.Config.Urls.ImageAPI)})})}export{Ie as BulkUserActionsStatusCompleteView};
//# sourceMappingURL=BhWkA33o.chunk.js.map
