import{k as m,o as f,R as o,l as x,F as h,j as s,E as y,b7 as g,a9 as u,aR as j,bT as P}from"./app-BgLa5dit.js";import{F as T}from"./Br5jp8YA.chunk.js";const n="userManager.exportUserList",r=h.encloseNamespace(n);function c(e){return e===P.Staff?r("staff"):r("student")}function F(e){const i=m(),t=f(j.currentUser()),[a,p]=o.useState(!1),l=x();return o.useEffect(()=>{if(!t.data||a)return;const d=T.requestExport({key:"customer.users.report",data:{userId:t.data.id,customerId:t.data.customerId,userType:e.userType,customerIdOverride:e.customerId}});i(d).then(()=>p(!0)).catch(()=>{l.error(r("error")),e.closePopup()})},[t.data]),s.jsx(y,{title:r("title",{type:c(e.userType)}),closePopup:e.closePopup,showLoadingSpinner:!a,children:a&&s.jsxs(s.Fragment,{children:[s.jsx("p",{children:s.jsx(g,{namespace:n,phrase:"message",options:{email:ClickView.User.email,type:c(e.userType)}})}),s.jsx(u,{children:s.jsx(u.Submit,{variant:"dark",text:"Okay",onClick:e.closePopup})})]})})}export{F as ExportUserListView};
//# sourceMappingURL=BxFcjDhJ.chunk.js.map
