import { getElementId, randomCode } from "../../../../plugins/utils";
import { BOOLEAN_TYPE } from "../../../../enumerate";

const MODEL = {
  type: "FILL_QUESTION",
  x: 0,
  y: 0,
  w: 280,
  h: 102,
  minHeight: 102,
  sign: "objective",
  topicName: "",
  topicNo: null,
  startNumber: 1,
  questionsCount: 10,
  optionCount: 4,
  questionCountPerGroup: 5,
  groupPerLine: 4, // 小题纵向排列时，表示每行组数。小题横向排列时，表示每行小题数。
  optionDirection: "horizontal",
  questionDirection: "vertical",
  questionGap: 8,
  groupGap: 30,
  optionGap: 6,
  isBoolean: false, // 是否是判断题
  booleanType: BOOLEAN_TYPE[0],
  isMultiply: false, // 是否是多选题
  isCovered: false,
  fontSize: "14px",
};

const getModel = () => {
  return {
    id: getElementId(),
    key: randomCode(),
    ...MODEL,
  };
};

export { MODEL, getModel };
