import{r as s,h as t,e as i}from"./p-ee1e0eb4.js";import{E as e}from"./p-bd90903e.js";import{A as o}from"./p-408176ba.js";import"./p-2f569553.js";const r=class{constructor(t){s(this,t),this.allowPostToFeed=!1,this.feedStartingText="My suggestions are:",this.isTeacherMode=!1,this.quizData=[]}async componentDidLoad(){this.isTeacherMode=0==this.isTeacherMode?window.location.href.indexOf("/presentation/course")>-1:this.isTeacherMode;const s=e.getInstance().get("sparkle");let t=await o.getInstance().loadJsonFile(s.quizPath);if(t&&this.questionIds){let s=this.questionIds.split(",");this.quizData=[],s.forEach((s=>{this.quizData=[...this.quizData,t[+s]]})),console.log("QUIZ Data",this.quizData)}}render(){return t(this.isTeacherMode?"sparkle-discussion-results":"sparkle-discussion-questions",{allowPostToFeed:this.allowPostToFeed,feedStartingText:this.feedStartingText,isTeacherMode:this.isTeacherMode,questions:this.quizData})}get el(){return i(this)}};r.style="sparkle-discussion{border:1px solid var(--line-rule-color);display:block;padding:12px}";export{r as sparkle_discussion}