import httpClient from '@/utils/http';

import { ControllerResponse, ExamExamSubjectScanAnswerSheetQuestion } from './data-contracts';
export default {
  /**
   * @description 根据模板ID和AI题目类型获取考试科目扫描答题卡题目列表
   */
  templateDetail: (
    templateId: number,
    query: {
      /** AI题目类型 */
      ai_question_type: string;
    }
  ) => {
    return httpClient.get<
      ControllerResponse & {
        data?: ExamExamSubjectScanAnswerSheetQuestion[];
      }
    >(`/exam-subject-scan-answer-sheet-question/template/${templateId}`, { query: query });
  },
  /**
   * @description 根据模板ID获取考试科目扫描答题卡题目列表
   */
  templateAllDetail: (templateId: number) => {
    return httpClient.get<
      ControllerResponse & {
        data?: ExamExamSubjectScanAnswerSheetQuestion[];
      }
    >(`/exam-subject-scan-answer-sheet-question/template/${templateId}/all`);
  },
  /**
   * @description 根据题目ID删除考试科目扫描答题卡题目
   */
  examSubjectScanAnswerSheetQuestionDelete: (id: number) => {
    return httpClient.delete<
      ControllerResponse & {
        message?: string;
      }
    >(`/exam-subject-scan-answer-sheet-question/${id}`);
  }
};
