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

const MODEL = {
  type: "SCORE_TABLE",
  x: 0,
  y: 0,
  w: 200,
  h: 63,
  detailCount: 5,
};

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

export { MODEL, getModel };
