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

const MODEL = {
  type: "FILL_FIELD",
  x: 0,
  y: 0,
  w: 200,
  h: 100,
  sign: "",
  fieldCountPerLine: 1,
  lineSpacing: 30,
  nameIsJustify: false,
  fields: [],
  fieldInfos: {}
};

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

export { MODEL, getModel };