"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var decoration_sketch_exports = {};
__export(decoration_sketch_exports, {
  SketchData: () => SketchData,
  sketchData_VariantFromJSON: () => sketchData_VariantFromJSON,
  sketchData_VariantToJSON: () => sketchData_VariantToJSON
});
module.exports = __toCommonJS(decoration_sketch_exports);
var import_decoration_sketch_enums = require("./decoration_sketch.enums.js");
function sketchData_VariantFromJSON(object) {
  switch (object) {
    case 0:
    case "UNDERLINE":
      return import_decoration_sketch_enums.SketchData_Variant.UNDERLINE;
    case 1:
    case "BOX":
      return import_decoration_sketch_enums.SketchData_Variant.BOX;
    case 2:
    case "CIRCLE":
      return import_decoration_sketch_enums.SketchData_Variant.CIRCLE;
    case 3:
    case "HIGHLIGHT":
      return import_decoration_sketch_enums.SketchData_Variant.HIGHLIGHT;
    case 4:
    case "STRIKETHROUGH":
      return import_decoration_sketch_enums.SketchData_Variant.STRIKETHROUGH;
    case 5:
    case "CROSSED_OFF":
      return import_decoration_sketch_enums.SketchData_Variant.CROSSED_OFF;
    case -1:
    case "UNRECOGNIZED":
    default:
      return import_decoration_sketch_enums.SketchData_Variant.UNRECOGNIZED;
  }
}
function sketchData_VariantToJSON(object) {
  switch (object) {
    case import_decoration_sketch_enums.SketchData_Variant.UNDERLINE:
      return "UNDERLINE";
    case import_decoration_sketch_enums.SketchData_Variant.BOX:
      return "BOX";
    case import_decoration_sketch_enums.SketchData_Variant.CIRCLE:
      return "CIRCLE";
    case import_decoration_sketch_enums.SketchData_Variant.HIGHLIGHT:
      return "HIGHLIGHT";
    case import_decoration_sketch_enums.SketchData_Variant.STRIKETHROUGH:
      return "STRIKETHROUGH";
    case import_decoration_sketch_enums.SketchData_Variant.CROSSED_OFF:
      return "CROSSED_OFF";
    default:
      return "UNKNOWN";
  }
}
const baseSketchData = { variant: import_decoration_sketch_enums.SketchData_Variant.UNDERLINE };
const SketchData = {
  fromJSON(object) {
    const message = { ...baseSketchData };
    message.variant = object.variant !== void 0 && object.variant !== null ? sketchData_VariantFromJSON(object.variant) : import_decoration_sketch_enums.SketchData_Variant.UNDERLINE;
    message.color = object.color !== void 0 && object.color !== null ? String(object.color) : void 0;
    message.animate = object.animate !== void 0 && object.animate !== null ? Boolean(object.animate) : void 0;
    return message;
  },
  toJSON(message) {
    const obj = {};
    message.variant !== void 0 && (obj.variant = sketchData_VariantToJSON(message.variant));
    message.color !== void 0 && (obj.color = message.color);
    message.animate !== void 0 && (obj.animate = message.animate);
    return obj;
  }
};
//# sourceMappingURL=decoration_sketch.js.map
