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

const MODEL = {
  type: "CARD_HEAD",
  x: 0,
  y: 0,
  w: 0,
  h: 0,
  title: "测试题卡规则1-题卡标题",
  attention: "测试题卡规则1-注意事项",
  objectiveAttention: "测试题卡规则1-客观题-注意事项",
  subjectiveAttention: "测试题卡规则1-主观题-注意事项",
  modelType: "MODEL_ONE",
  sign: "head",
};

const getModel = (presetData) => {
  const model = objAssign(MODEL, presetData);
  model.id = getElementId();
  model.key = randomCode();

  return model;
};

export { MODEL, getModel };
