import{LitElement as e}from"../../../lit/index.js";import{observable as t,makeObservable as s,configure as a,computed as o,toJS as i}from"../../../mobx/dist/mobx.esm.js";a({enforceActions:!1});class GradeBookStoreClass extends e{static get tag(){return"grade-book-store"}constructor(){super(),this.gradeScale=[],this.activeRubric=[],this.database={tags:{categories:[],data:[]},submissions:[],rubrics:[],assignments:[],roster:[],grades:{},gradesDetails:{},gradeScale:[],settings:{}},this.activeStudent=0,this.activeAssignment=0,s(this,{gradeScale:t,activeStudent:t,activeRubric:t,activeAssignment:t,database:t,activeSubmission:o})}get activeSubmission(){const e=i(this.database),t=i(this.activeStudent),s=i(this.activeAssignment);for(var a in this.database.submissions){let o=this.database.submissions[a];if(o.student===e.roster[t].student&&o[e.assignments[s].shortName])return o[e.assignments[s].shortName]}return null}}customElements.define(GradeBookStoreClass.tag,GradeBookStoreClass);export{GradeBookStoreClass};globalThis.GradeBookStore=globalThis.GradeBookStore||{},globalThis.GradeBookStore.requestAvailability=function(){return globalThis.GradeBookStore.instance||(globalThis.GradeBookStore.instance=globalThis.document.createElement("grade-book-store"),globalThis.document.body.appendChild(globalThis.GradeBookStore.instance)),globalThis.GradeBookStore.instance};export const GradeBookStore=globalThis.GradeBookStore.requestAvailability();