import{h as n,i as m,bT as l,aT as r,cG as o,g as d}from"./app-BgLa5dit.js";function T(e,t){var a,s;return{userId:e.id,firstName:e.name,surname:e.surname,userType:e.userType,customerId:t,email:e.email||"",masterYearGroup:e.masterYearGroup??null,username:e.username,masterRole:(a=e.userProfile)==null?void 0:a.role,status:e.status,displayName:((s=e.metadata)==null?void 0:s.displayName)??""}}function c(e,t,a){return{application:m.CUSTOMERS,action:t===l.Learner?n.Customers.MANAGE_STUDENTS:n.Customers.MANAGE_STAFF,args:[e],params:{cursor:a}}}function A(e,t,a){const[s,u]=r.useState(!1),[i,p]=r.useState(null);r.useEffect(()=>{e.statusCode===o.Ok&&(u(!0),p(e.data.userType)),e.statusCode===o.NotFound&&s&&d.trigger(c(t,i,a))},[e.statusCode])}export{c as a,T as g,A as u};
//# sourceMappingURL=suWkXv_c.chunk.js.map
