import{ax as x,e9 as L,az as t,bu as P,fd as y,L as A,ao as R,aF as E}from"./app-k0jcl5PQ.js";import{u as N}from"./B8qKg3jw.chunk.js";import{a as U}from"./BzIt8QkE.chunk.js";import{S as j}from"./B_emoU9Y.chunk.js";import{I as r}from"./hCTjXXcY.chunk.js";import{u as b}from"./CAxN5LKv.chunk.js";import{u as D}from"./CgoG6iJ6.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";const V="shared.interactiveStudentResults",q=A.encloseNamespace(V);function ae(e){var m,c,l;const[n]=x(L.ANONYMISE_USERS);D();const s=t(r.interactiveMetadata()),a=t(r.interactive()),i=t(r.interactiveResults()),d=t(P.config());b([s,i]),y(s);const{markedAnswers:w,addMarkedAnswers:C,submitMarkedAnswers:M}=N((m=a.data)==null?void 0:m.id,(c=s.data)==null?void 0:c.id,e.closePopup),o=(l=i.data)==null?void 0:l.students.find(p=>{var g,f,S,I,h,v;return e.userId?((f=(g=p.user)==null?void 0:g.id)==null?void 0:f.toString())===((S=e.userId)==null?void 0:S.toString()):e.sessionId?((h=(I=p.user)==null?void 0:I.sessionId)==null?void 0:h.toString())===((v=e.sessionId)==null?void 0:v.toString()):!1}),k=o?q("heading",{studentName:U(o.user,n)}):"",u=!!a.data&&!!i.data&&!!d.data;return R.jsx(E,{title:k,showLoadingSpinner:!u,closePopup:e.closePopup,size:"lg",children:u&&R.jsx(j,{interactive:a.data,studentResults:o,markedAnswers:w,addMarkedAnswers:C,submitMarkedAnswers:M,imageCdnUrl:d.data.imageCdnUrl,selectedInteractionId:e.interactionId,onClickClose:e.closePopup,anonymiseUsers:n,reportsStyling:e.reportsStyling,isDemo:!0})})}export{ae as InteractiveStudentResultsDemoView};
//# sourceMappingURL=JqxpjSR2.chunk.js.map
