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

const MODEL = {
  type: "BARCODE",
  x: 0,
  y: 0,
  w: 300,
  h: 60,
  sign: "",
  rotation: 0,
  bold: "1px",
  color: "#ffffff",
  bgColor: "#ffffff",
  style: "solid",
  fields: [],
  content: "",
};

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

export { MODEL, getModel };
