import { get } from '../request'

const questionExplainApi = {
  /** 获取我的班级信息 */
  myClass: async () => {
    return await get<any>('/school/questionExplain/myClass')
  },
  /** 根据发布记录ID获取试卷详情（讲解页面使用） */
  getPaperDetailByReleaseRecordId: async (recordId: string) => {
    return await get<any>('/school/paper/getPaperDetailByReleaseRecordId', { recordId })
  },
  /** 获取当前班级的讲解状态 */
  current: async (classId: string) => {
    return await get<{ explaining: boolean; questionId: string; recordId: number }>(
      '/school/questionExplain/current',
      { classId },
    )
  },
}

export default questionExplainApi
