import{u as h,o as p,aP as k,j as d,bs as I,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,c as J,B as _}from"./fZ5oUMOc.chunk.js";import{B as x}from"./BxYybc33.chunk.js";import{B as o}from"./DpUpv6rY.chunk.js";import{a as M}from"./CTNq1KmP.chunk.js";import{u as W}from"./PpGk0l1b.chunk.js";import{J as i}from"./DfIMhO3y.chunk.js";import{g as D}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";const F="userManager.bulkUserActionsStatusCompleteView",s=B.encloseNamespace(F);function O(e,c,t){if(!e)return"";if(c===w.Learner)switch(e){case"delete":return s("deleteStudentsSuccess",{smartCount:t});case"deactivate":return s("deactivateStudentsSuccess",{smartCount:t});case"reactivate":return s("reactivateStudentsSuccess",{smartCount:t});case"changeYearGroup":return s("changeYearGroupSuccess",{smartCount:t});case"yearGroupRollover":return s("yearGroupRolloverSuccess");case"addToClassroom":return s("addToClassroomSuccess",{smartCount:t});case"resetPassword":return s("resetPasswordSuccess",{smartCount:t});case"activationEmail":return s("activationEmailSuccess",{smartCount:t});case"removeFromSchool":return s("removeFromSchoolStudentSuccess",{smartCount:t});default:return g.throw(new C(`Missing switch statement case for ${e} in BulkUserActionsStatusCompleteView.tsx`)),""}switch(e){case"delete":return s("deleteStaffSuccess",{smartCount:t});case"deactivate":return s("deactivateStaffSuccess",{smartCount:t});case"reactivate":return s("reactivateStaffSuccess",{smartCount:t});case"resetEmail":return s("resetEmailSuccess",{smartCount:t});case"removeFromSchool":return s("removeFromSchoolStaffSuccess",{smartCount:t});default:return g.throw(new C(`Missing switch statement case for ${e} in BulkUserActionsStatusCompleteView.tsx`)),""}}function Ae(e){const{users:c,count:t}=V(e.customerId,e.userType),[r,b]=h(L.BULK_USER_ACTIONS),u=D(e.customerId,e.userType),n=p(i.getJob(e.jobId)),m=p(i.getJobSummary(e.jobId));W(n);const A=k(),f=o.useCreateJobErrorAlert();function y(){const a=o.getCreateJobRequestData(r,e.customerId,e.userType);R(A,i.createJob(a,U,f))}function U(a){j.trigger({...u.bulkActionsStatus.polling,params:{userType:e.userType,jobId:a.id}})}const l=!!n.data&&!!m.data;return d.jsx(J,{appLinks:u,userType:e.userType,users:c,currentStep:"status",userCount:t,preventNavLock:!0,disableAppLinks:!0,hideHeader:!0,loaded:l,children:l&&d.jsx(M,{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:O(r==null?void 0:r.subAction,e.userType,m.data.totalSucceeded),navLockId:_,actionVerb:o.mapSubActionToVerb(r==null?void 0:r.subAction),onFinish:()=>b({}),preventLoggingAnalytics:!r,analyticsData:{action:x.getAnalyticsActionName(r)},analyticsOptions:{location:v.BulkUserActionsWizard,entity:T.User,actionType:I.BulkAction},getErrorListItem:a=>o.getErrorListItem(a,ClickView.Config.Urls.ImageAPI)})})}export{Ae as BulkUserActionsStatusCompleteView};
//# sourceMappingURL=BOi7gpdU.chunk.js.map
