"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 plugin_divider_exports = {};
__export(plugin_divider_exports, {
  DividerData: () => DividerData,
  dividerData_AlignmentFromJSON: () => dividerData_AlignmentFromJSON,
  dividerData_AlignmentToJSON: () => dividerData_AlignmentToJSON,
  dividerData_LineStyleFromJSON: () => dividerData_LineStyleFromJSON,
  dividerData_LineStyleToJSON: () => dividerData_LineStyleToJSON,
  dividerData_WidthFromJSON: () => dividerData_WidthFromJSON,
  dividerData_WidthToJSON: () => dividerData_WidthToJSON
});
module.exports = __toCommonJS(plugin_divider_exports);
var import_common = require("./common.js");
var import_plugin_divider_enums = require("./plugin_divider.enums.js");
function dividerData_LineStyleFromJSON(object) {
  switch (object) {
    case 0:
    case "SINGLE":
      return import_plugin_divider_enums.DividerData_LineStyle.SINGLE;
    case 1:
    case "DOUBLE":
      return import_plugin_divider_enums.DividerData_LineStyle.DOUBLE;
    case 2:
    case "DASHED":
      return import_plugin_divider_enums.DividerData_LineStyle.DASHED;
    case 3:
    case "DOTTED":
      return import_plugin_divider_enums.DividerData_LineStyle.DOTTED;
    case -1:
    case "UNRECOGNIZED":
    default:
      return import_plugin_divider_enums.DividerData_LineStyle.UNRECOGNIZED;
  }
}
function dividerData_LineStyleToJSON(object) {
  switch (object) {
    case import_plugin_divider_enums.DividerData_LineStyle.SINGLE:
      return "SINGLE";
    case import_plugin_divider_enums.DividerData_LineStyle.DOUBLE:
      return "DOUBLE";
    case import_plugin_divider_enums.DividerData_LineStyle.DASHED:
      return "DASHED";
    case import_plugin_divider_enums.DividerData_LineStyle.DOTTED:
      return "DOTTED";
    default:
      return "UNKNOWN";
  }
}
function dividerData_WidthFromJSON(object) {
  switch (object) {
    case 0:
    case "LARGE":
      return import_plugin_divider_enums.DividerData_Width.LARGE;
    case 1:
    case "MEDIUM":
      return import_plugin_divider_enums.DividerData_Width.MEDIUM;
    case 2:
    case "SMALL":
      return import_plugin_divider_enums.DividerData_Width.SMALL;
    case -1:
    case "UNRECOGNIZED":
    default:
      return import_plugin_divider_enums.DividerData_Width.UNRECOGNIZED;
  }
}
function dividerData_WidthToJSON(object) {
  switch (object) {
    case import_plugin_divider_enums.DividerData_Width.LARGE:
      return "LARGE";
    case import_plugin_divider_enums.DividerData_Width.MEDIUM:
      return "MEDIUM";
    case import_plugin_divider_enums.DividerData_Width.SMALL:
      return "SMALL";
    default:
      return "UNKNOWN";
  }
}
function dividerData_AlignmentFromJSON(object) {
  switch (object) {
    case 0:
    case "CENTER":
      return import_plugin_divider_enums.DividerData_Alignment.CENTER;
    case 1:
    case "LEFT":
      return import_plugin_divider_enums.DividerData_Alignment.LEFT;
    case 2:
    case "RIGHT":
      return import_plugin_divider_enums.DividerData_Alignment.RIGHT;
    case -1:
    case "UNRECOGNIZED":
    default:
      return import_plugin_divider_enums.DividerData_Alignment.UNRECOGNIZED;
  }
}
function dividerData_AlignmentToJSON(object) {
  switch (object) {
    case import_plugin_divider_enums.DividerData_Alignment.CENTER:
      return "CENTER";
    case import_plugin_divider_enums.DividerData_Alignment.LEFT:
      return "LEFT";
    case import_plugin_divider_enums.DividerData_Alignment.RIGHT:
      return "RIGHT";
    default:
      return "UNKNOWN";
  }
}
const baseDividerData = {
  lineStyle: import_plugin_divider_enums.DividerData_LineStyle.SINGLE,
  width: import_plugin_divider_enums.DividerData_Width.LARGE,
  alignment: import_plugin_divider_enums.DividerData_Alignment.CENTER
};
const DividerData = {
  fromJSON(object) {
    const message = { ...baseDividerData };
    message.containerData = object.containerData !== void 0 && object.containerData !== null ? import_common.PluginContainerData.fromJSON(object.containerData) : void 0;
    message.lineStyle = object.lineStyle !== void 0 && object.lineStyle !== null ? dividerData_LineStyleFromJSON(object.lineStyle) : import_plugin_divider_enums.DividerData_LineStyle.SINGLE;
    message.width = object.width !== void 0 && object.width !== null ? dividerData_WidthFromJSON(object.width) : import_plugin_divider_enums.DividerData_Width.LARGE;
    message.alignment = object.alignment !== void 0 && object.alignment !== null ? dividerData_AlignmentFromJSON(object.alignment) : import_plugin_divider_enums.DividerData_Alignment.CENTER;
    return message;
  },
  toJSON(message) {
    const obj = {};
    message.containerData !== void 0 && (obj.containerData = message.containerData ? import_common.PluginContainerData.toJSON(message.containerData) : void 0);
    message.lineStyle !== void 0 && (obj.lineStyle = dividerData_LineStyleToJSON(message.lineStyle));
    message.width !== void 0 && (obj.width = dividerData_WidthToJSON(message.width));
    message.alignment !== void 0 && (obj.alignment = dividerData_AlignmentToJSON(message.alignment));
    return obj;
  }
};
//# sourceMappingURL=plugin_divider.js.map
