import type { Difficulty } from '#/views/x/tms/question/types';
import type { SelfTestDifficulty } from './constants';

/** 自我检测抽题条件 */
export interface SelfTestTypeSetting {
  count: number;
  difficulty: SelfTestDifficulty;
}

export interface SelfTestFormModel {
  bankId?: string;
  single: SelfTestTypeSetting;
  multi: SelfTestTypeSetting;
  judge: SelfTestTypeSetting;
}

export interface SelfTestStartPayload {
  bankId: string;
  bankName?: string;
  single: SelfTestTypeSetting;
  multi: SelfTestTypeSetting;
  judge: SelfTestTypeSetting;
}

/** 抽题结果（考试页） */
export interface SelfTestPaper {
  paperId: string;
  bankId: string;
  bankName: string;
  questions: SelfTestQuestionItem[];
}

export interface SelfTestQuestionItem {
  id: string;
  questionNo?: string;
  questionType: 'single' | 'multi' | 'judge';
  difficulty?: Difficulty;
  stem: string;
  options: { optionLabel: string; optionContent: string; isCorrect: '0' | '1' }[];
}
