export const getInitQuestionModel = () => {
  return {
    id: null,
    editMode: "paper",
    sourceDetailId: "",
    courseId: "",
    difficulty: "",
    quesProperties: [],
    score: 0,
    publicity: true,
    control: { maxAnswerTime: 0 },
    answerAnalysis: null,
    quesAnswer: null,
  };
};

// 新的题型编码，全局通用
// 1-单选，2-多选，3-判断，4-填空，5-问答
// 100-阅读理解，101-完形填空，102-段落匹配，103-选词填空
// Doc: https://doc.qmth.com.cn/pages/viewpage.action?pageId=23334762
const typeQuestionTypes = {
  1: "SINGLE_ANSWER_QUESTION",
  2: "MULTIPLE_ANSWER_QUESTION",
  3: "BOOL_ANSWER_QUESTION",
  4: "FILL_BLANK_QUESTION",
  5: "TEXT_ANSWER_QUESTION",
  100: "READING_COMPREHENSION",
  101: "CLOZE",
  102: "PARAGRAPH_MATCHING",
  103: "BANKED_CLOZE",
};

export function structTypeToQuestionType(type) {
  return typeQuestionTypes[type];
}
