import{bc as m,aI as d,cb as u,ao as e,aO as x,aq as n,L as h,ba as p}from"./app-k0jcl5PQ.js";import{l as j}from"./BhAq_-86.chunk.js";import{W as f}from"./Dqgyavxf.chunk.js";var a=(s=>(s.ShowDetails="show-details",s.EmailedUsers="emailed-students",s.EmailedAdmin="emailed-admin",s))(a||{});const t="userManager.userCreatedSuccess";function b(s){return e.jsx("div",{className:"d-flex justify-content-center w-50 mx-auto pb-3",children:e.jsx("img",{src:s.emailSentImageUrl,alt:"",role:"presentation",className:"w-100"})})}function g(s){return e.jsxs(e.Fragment,{children:[e.jsx("p",{children:e.jsx(n,{phrase:"userDetailsInfo"})}),e.jsx("p",{className:"mb-0 fw-semibold",children:e.jsx(n,{phrase:"username"})}),e.jsx("p",{children:s.creationResponse.username}),e.jsx("p",{className:"mb-0 fw-semibold",children:e.jsx(n,{phrase:"password"})}),e.jsx("p",{children:s.creationResponse.password})]})}function w(s){return e.jsxs(e.Fragment,{children:[e.jsx(b,{...s}),e.jsx("p",{children:e.jsx(n,{phrase:"emailedUsersInfo",options:{smartCount:s.creationResponse.isBulk?2:1}})})]})}function C(s){const o=m();function l(){o.success(h.getPhrase(t,"copied")),s.onClose()}const r=d.useMemo(()=>s.userType===u.Staff||s.creationResponse.isBulk||s.creationResponse.hasEmail?a.EmailedUsers:a.ShowDetails,[s.creationResponse]);if(!r)return e.jsx(e.Fragment,{});const c=(()=>{switch(r){case a.ShowDetails:return e.jsx(g,{...s});case a.EmailedUsers:return e.jsx(w,{...s})}})();return e.jsxs(x.Provider,{value:t,children:[c,e.jsx("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3",children:r===a.ShowDetails?e.jsx(j.CopyToClipboard,{onCopy:l,text:`${s.creationResponse.username} - ${s.creationResponse.password}`,children:e.jsx("button",{className:"btn btn-dark",children:e.jsx(n,{phrase:"copy"})})}):e.jsx("button",{onClick:s.onClose,className:"btn btn-dark",children:e.jsx(n,{phrase:"okay"})})})]})}const i="userManager.editUser";function E(s){return e.jsxs(f,{className:"py-2",children:[e.jsx(n,{namespace:i,phrase:s.isNew?"newSsoUserWarning":"editSsoUserWarning"}),!s.isNew&&e.jsx(p,{appLink:s.ssoMappingsApplink,className:"info-link d-block my-1",openInNewTab:!0,children:e.jsx(n,{namespace:i,phrase:"ssoMapping"})}),e.jsx("a",{className:"info-link d-block",href:s.helpArticle,target:"_blank",children:e.jsx(n,{namespace:i,phrase:"ssoArticleLink"})})]})}export{E as L,C as U};
//# sourceMappingURL=Ci9wan9m.chunk.js.map
