import{iO as A,az as s,bu as U,aj as x,bN as B,L,c4 as J,iW as C,iV as y,ao as l,iP as M,O as v,r as O,E as P,p as D,aP as b,M as W,cb as _,m as H,v as q}from"./app-k0jcl5PQ.js";import{B as z,a as N}from"./B7GcIt_R.chunk.js";import{U as V}from"./B4GO8DD1.chunk.js";import{u as K}from"./wuHL1Gkg.chunk.js";import{W as w}from"./BofPOOhn.chunk.js";import{u as F}from"./CAxN5LKv.chunk.js";import{J as n}from"./hKqzfsO4.chunk.js";import"./Djb1f-EX.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./CpGXOT1_.chunk.js";import"./DkDkjje4.chunk.js";import"./CnmbO5oy.chunk.js";import"./DIAJ896Y.chunk.js";import"./fstW5ZQE.chunk.js";const S="userManager.bulkUserUploadStatusCompleted",f=L.encloseNamespace(S);function ce(e){const{users:i,existingUserToAdd:a,existingUsersHash:T}=K(),u=A(e.userType),m=s(U.version()),r=s(x.currentUser()),c=s(U.config()),p=s(n.getJob(e.jobId)),d=s(n.getJobSummary(e.jobId));F(p),B({title:L.getPhrase(S,"pageTitle")});const h=J(),j=C.useCreateJobErrorAlert(),o=y.getNewUsers(i,T);function k(){const t=y.getJobData({users:o,existingUsers:a,customerId:r.data.customerId,userType:e.userType});H(h,n.createUserJob(t,m.data,I,j))}function I(t){q.trigger({...u.userUploadStatus.polling,params:{userType:e.userType,jobId:t.id}})}const g=((o==null?void 0:o.length)??0)+((a==null?void 0:a.length)??0);function E(){return e.userType===_.Learner?f("createStudentsSuccess",{smartCount:g}):f("createStaffSuccess",{smartCount:g})}const R=!!p.data&&!!c.data&&!!r.data&&!!d.data&&m.hasCompleted;return l.jsx(V.Provider,{value:M.Primary,children:l.jsx(z,{appLinks:u,userType:e.userType,currentStep:"status",canAddExistingUsers:!0,children:!!R&&l.jsx(w,{job:p.data,summary:d.data,objectCount:i.length,objectType:W.User,userType:e.userType,finishAppLink:u.userManager,imageCdnUrl:c.data.imageCdnUrl,successImageUrl:b.SUCCESS,failedImageUrl:b.WIZARD_ERROR,currentUser:r.data,onClickTryAgain:k,getResultsRequest:n.getJobResults,actionSucceededMessage:E(),navLockId:N,actionVerb:"Create",analyticsOptions:{location:D.BulkUserUploadWizard,entity:P.User,actionType:O.Create,descriptor:v.Bulk},preventLoggingAnalytics:!i,getErrorListItem:t=>C.getErrorListItem(t,c.data.imageCdnUrl,r.data)})})})}export{ce as BulkUserUploadStatusCompleteView};
//# sourceMappingURL=D-EnLyMh.chunk.js.map
