import{c4 as w,az as n,aj as O,aC as k,ah as v,m as h}from"./app-k0jcl5PQ.js";import{C as i}from"./_XP6hjk3.chunk.js";import{U as R}from"./9ls1F1Ve.chunk.js";function H(t,a){var f,p,l,g;const u=w(),r=n(O.currentUser()),c=n(r.data&&i.getClassroom(t,r.data.id)),d=n(R.getUser(a)),C=n(((f=r.data)==null?void 0:f.customerId)&&c.data&&i.getClassroomStaff(t,r.data.customerId)),o=(g=k.first((l=(p=C.data)==null?void 0:p.find(e=>{var s;return((s=e.id)==null?void 0:s.toString())===(a==null?void 0:a.toString())}))==null?void 0:l.enrolments.data))==null?void 0:g.id,U=(e,s)=>{if(!o){s();return}const m=i.revokeOwnership(t,o,e,s);h(u,m)},q=(e,s)=>{if(!o){s();return}const m=i.assignAsOwner(t,o,e,s);h(u,m)};return{classroom:c.data,hasLoaded:c.hasCompleted&&d.hasCompleted,teacherName:v.getFullName(d.data),revoke:U,assign:q}}export{H as u};
//# sourceMappingURL=zLT2SRER.chunk.js.map
