import{H as m,b0 as f,az as y,aj as d,aI as u,bc as h,L as g,ao as t,aF as U,aq as j,bU as o,cb as P}from"./app-k0jcl5PQ.js";const q={requestUserExport(e,a){return{url:`{gateway}/v1/customers/${e}/generate-user-report`,key:"request:user:export",type:m.POST,data:a,normalize:!1}}},p="userManager.exportUserList",r=g.encloseNamespace(p);function c(e){return e===P.Staff?r("staff"):r("student")}function b(e){const a=f(),s=y(d.currentUser()),[n,i]=u.useState(!1),l=h();return u.useEffect(()=>{if(!s.data||n)return;const x=q.requestUserExport(s.data.customerId,{userType:e.userType});a(x).then(()=>i(!0)).catch(()=>{l.error(r("error")),e.closePopup()})},[s.data]),t.jsx(U,{title:r("title",{type:c(e.userType)}),closePopup:e.closePopup,showLoadingSpinner:!n,children:n&&t.jsxs(t.Fragment,{children:[t.jsx("p",{children:t.jsx(j,{namespace:p,phrase:"message",options:{email:s.data.email,type:c(e.userType)}})}),t.jsx(o,{children:t.jsx(o.Submit,{variant:"dark",text:"Okay",onClick:e.closePopup})})]})})}export{b as ExportUserListView};
//# sourceMappingURL=I9pJ6kVL.chunk.js.map
