import{ax as A,e9 as P,az as i,bu as k,aA as L,bw as R,L as N,ao as w,aF as U}from"./app-k0jcl5PQ.js";import{u as E}from"./B8qKg3jw.chunk.js";import{a as q}from"./BzIt8QkE.chunk.js";import{S as y}from"./B_emoU9Y.chunk.js";import{u as V}from"./CAxN5LKv.chunk.js";import{b as z}from"./Bc38NwUJ.chunk.js";import"./uoUaCILN.chunk.js";import"./CNtKSILN.chunk.js";import"./CG1PE8VW.chunk.js";import"./NRZx5qCo.chunk.js";import"./CX9BGBTP.chunk.js";import"./CCcIOoB4.chunk.js";import"./CMnqIsoM.chunk.js";import"./s-4A5pEU.chunk.js";import"./Bcve7ust.chunk.js";import"./BEDdXV-K.chunk.js";import"./B31bqZwo.chunk.js";import"./DIAJ896Y.chunk.js";import"./_XP6hjk3.chunk.js";const F="shared.insightsStudentResults",O=N.encloseNamespace(F);function ne(e){var m,u,l,p,h;const[o]=A(P.ANONYMISE_USERS),r=i(k.config()),s=i(L.getShare(e.shareId)),t=i(((m=s.data)==null?void 0:m.objectId)&&R.interactiveMetadata(s.data.objectId)),a=i(((u=t.data)==null?void 0:u.interactiveId)&&R.interactive(t.data.interactiveId)),d=z(e.shareId);V([s,a,t]);const{markedAnswers:M,addMarkedAnswers:b,submitMarkedAnswers:j}=E((l=a.data)==null?void 0:l.id,(p=t.data)==null?void 0:p.id,e.closePopup),n=(h=d.data)==null?void 0:h.students.find(g=>{var I,S,f,v,C;return e.userId?((S=(I=g.user)==null?void 0:I.id)==null?void 0:S.toString())===((f=e.userId)==null?void 0:f.toString()):e.sessionId?((v=g.sessionId)==null?void 0:v.toString())===((C=e.sessionId)==null?void 0:C.toString()):!1}),x=n?O("heading",{studentName:q(n.user,o)}):"",c=r.hasCompleted&&s.hasCompleted&&t.hasCompleted&&a.hasCompleted&&d.hasCompleted;return w.jsx(U,{title:x,showLoadingSpinner:!c,closePopup:e.closePopup,size:"lg",children:c&&w.jsx(y,{interactive:a.data,studentResults:n,markedAnswers:M,addMarkedAnswers:b,submitMarkedAnswers:j,imageCdnUrl:r.data.imageCdnUrl,selectedInteractionId:e.interactionId,onClickClose:e.closePopup,anonymiseUsers:o})})}export{ne as InsightsStudentResultsView};
//# sourceMappingURL=QpRMrbFV.chunk.js.map
