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

const MODEL = {
  type: "TEXT",
  x: 0,
  y: 0,
  w: 200,
  h: 50,
  sign: "",
  textAlign: "left",
  fontWeight: 400,
  fontFamily: "宋体",
  fontSize: "14px",
  color: "#000",
  mode: "normal", // side:侧边模式,normal:正常模式
  content: [
    {
      type: "text",
      content: "样例内容",
    },
  ],
};

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

export { MODEL, getModel };
