import{R as g,k as C,o as k,j as s,c2 as x,g as y}from"./app-BgLa5dit.js";import{B}from"./BWI88cUh.chunk.js";import{B as j}from"./C0Fqgg75.chunk.js";import{U as b}from"./ZKp_vc-v.chunk.js";import{a as h}from"./m4aqaK_l.chunk.js";import{u as I}from"./DL8ott7R.chunk.js";import{B as T}from"./DpUpv6rY.chunk.js";import{B as a}from"./DpWmZ9cE.chunk.js";import{J as A}from"./DfIMhO3y.chunk.js";import{C as J}from"./q-IBKcuF.chunk.js";import{g as E}from"./B1ElCHu3.chunk.js";import"./C16qNPRj.chunk.js";import"./CetbvyBn.chunk.js";import"./KPdA3ghp.chunk.js";import"./D8ca7W7r.chunk.js";import"./CZyx6Aii.chunk.js";import"./MEkA24R1.chunk.js";import"./BTbZzD17.chunk.js";import"./B3eOBVf8.chunk.js";import"./3nM7jLnE.chunk.js";import"./CPXlV0fg.chunk.js";import"./DJ0pq8J_.chunk.js";import"./CG7zbly5.chunk.js";import"./C53kfXmd.chunk.js";import"./DusGkY45.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";function ne(e){var n;const{users:o,existingUsersHash:i,existingUserToAdd:t,deleteUsers:p}=I();g.useEffect(()=>{var r;(t==null?void 0:t.length)<((r=Object.keys(i))==null?void 0:r.length)&&p(a.getDeletedExistingUsers(o,i,t).map(f=>f.lookupId))},[]);const m=E(e.customerId,e.userType),u=C(),c=k(J.getCustomerProducts(e.customerId)),l=T.useCreateJobErrorAlert();function d(){const r=a.getJobData({users:a.getNewUsers(o,i),existingUsers:t,customerId:e.customerId,userType:e.userType});u(A.createUserJob(r,U,l))}function U(r){y.trigger({...m.userUploadStatus.polling,params:{userType:e.userType,jobId:r.id}})}return o?s.jsx(b.Provider,{value:h.Primary,children:s.jsx(j,{appLinks:m,userType:e.userType,currentStep:"confirmation",canAddExistingUsers:!((n=c.data)!=null&&n.some(r=>r.id===x.Online)),children:s.jsx("div",{className:"px-3",children:s.jsx(B,{onClickConfirm:d,users:o,existingUsers:t,existingUsersHash:i,userType:e.userType,imageCdnUrl:ClickView.Config.Urls.ImageAPI})})})}):s.jsx(s.Fragment,{})}export{ne as BulkUserUploadConfirmationView};
//# sourceMappingURL=C_WBaCOZ.chunk.js.map
