import{j as e,bA as A,el as a,b7 as t,F as m,bT as l,R as c,u as N,bZ as p}from"./app-BgLa5dit.js";import{W as x}from"./C16qNPRj.chunk.js";import{R as u}from"./CetbvyBn.chunk.js";import{B as S}from"./KPdA3ghp.chunk.js";import{W as k}from"./D8ca7W7r.chunk.js";import{W as v}from"./CZyx6Aii.chunk.js";import{W as w}from"./MEkA24R1.chunk.js";const y="_noAccount_1y7nv_1",I={noAccount:y},f="userManager.bulkUserUploadAccountInfo",h=m.encloseNamespace(f);function T(s){const r=s.users.length-s.existingUsers.length;return e.jsxs(A.Provider,{value:f,children:[e.jsxs(u,{className:"mb-2",children:[e.jsx(a,{xs:4,className:"font-weight-500",children:e.jsx(t,{phrase:"statuses"})}),e.jsx(a,{xs:8,className:"font-weight-500",children:e.jsx(t,{phrase:"changesTo"})})]}),!!r&&e.jsxs(u,{className:"mb-2",children:[e.jsxs(a,{xs:4,children:[e.jsx(x,{className:I.noAccount,children:h("noAccount")}),e.jsx("div",{children:e.jsx(t,{phrase:s.userType===l.Learner?"studentCount":"staffCount",options:{smartCount:r}})})]}),e.jsx(a,{xs:8,children:e.jsx("div",{children:e.jsx(t,{phrase:s.userType===l.Learner?"willCreate":"willInvite"})})})]}),!!s.existingUsers.length&&e.jsxs(u,{className:"mb-2",children:[e.jsxs(a,{xs:4,children:[e.jsx(x,{children:h("existingAccount")}),e.jsx("div",{children:e.jsx(t,{phrase:s.userType===l.Learner?"studentCount":"staffCount",options:{smartCount:s.existingUsers.length}})})]}),e.jsx(a,{xs:8,children:e.jsx("div",{children:e.jsx(t,{phrase:"willAdd"})})})]})]})}const i="userManager.bulkUserUploadConfirmation",d=m.encloseNamespace(i);function E(s){const r=c.useRef(null),[,g]=N(p.BULK_USER_ACTIONS),{setOnClickConfirm:j}=c.useContext(w);c.useEffect(()=>{var n;g("scrollContainer",(n=r.current)==null?void 0:n.view)},[r.current]);const o=s.userType===l.Learner;c.useEffect(()=>{j(()=>s.onClickConfirm)},[s.onClickConfirm]);function C(n){function U(){return s.existingUsersHash[n.lookupId]?d(o?"existingStudentAccount":"existingStaffAccount"):d("noAccount")}return e.jsx("div",{className:"flex-shrink-0 me-2",children:U()})}return e.jsxs(e.Fragment,{children:[e.jsxs(v,{children:[e.jsx("h4",{className:"h6",children:e.jsx(t,{namespace:i,phrase:"heading"})}),e.jsxs("ul",{className:"mt-1 ps-3 ms-1",children:[e.jsx("li",{children:e.jsx(t,{namespace:i,phrase:o?"creationInfoStudent":"creationInfoStaff"})}),e.jsx("li",{children:e.jsx(t,{namespace:i,phrase:o?"addInfoStudent":"addInfoStaff"})})]}),e.jsx("div",{className:"rounded p-2 bg-light-blue",children:e.jsx(T,{users:s.users,existingUsers:s.existingUsers,userType:s.userType})})]}),e.jsx("h3",{className:"h6 mt-3",children:e.jsx(t,{namespace:i,phrase:o?"headingStudents":"headingStaff",options:{smartCount:s.users.length}})}),e.jsx(k,{items:s.users,rowHeight:55,ref:r,getComponent:n=>e.jsx(S,{user:{...n,name:n.firstName,id:n.lookupId,masterYearGroup:null},userType:s.userType,imageCdnUrl:s.imageCdnUrl,customBadge:()=>C(n)},n.lookupId)})]})}export{E as B};
//# sourceMappingURL=BWI88cUh.chunk.js.map
