"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_smart_block_exports = {};
__export(plugin_smart_block_exports, {
  SmartBlockCellData: () => SmartBlockCellData,
  SmartBlockData: () => SmartBlockData,
  smartBlockData_ColumnSizeFromJSON: () => smartBlockData_ColumnSizeFromJSON,
  smartBlockData_ColumnSizeToJSON: () => smartBlockData_ColumnSizeToJSON,
  smartBlockData_TypeFromJSON: () => smartBlockData_TypeFromJSON,
  smartBlockData_TypeToJSON: () => smartBlockData_TypeToJSON
});
module.exports = __toCommonJS(plugin_smart_block_exports);
var import_common = require("./common.js");
var import_plugin_smart_block_enums = require("./plugin_smart_block.enums.js");
function smartBlockData_TypeFromJSON(object) {
  switch (object) {
    case 0:
    case "SOLID_BOXES":
      return import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES;
    case 1:
    case "NUMBERED_BOXES":
      return import_plugin_smart_block_enums.SmartBlockData_Type.NUMBERED_BOXES;
    case 2:
    case "STATS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.STATS;
    case 3:
    case "CIRCLE_STATS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.CIRCLE_STATS;
    case 4:
    case "SOLID_BOXES_ALTERNATING":
      return import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES_ALTERNATING;
    case 5:
    case "SOLID_JOINED_BOXES":
      return import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_JOINED_BOXES;
    case 6:
    case "SIDE_LINE_TEXT":
      return import_plugin_smart_block_enums.SmartBlockData_Type.SIDE_LINE_TEXT;
    case 7:
    case "TOP_LINE_TEXT":
      return import_plugin_smart_block_enums.SmartBlockData_Type.TOP_LINE_TEXT;
    case 8:
    case "OUTLINE_BOXES_WITH_TOP_CIRCLE":
      return import_plugin_smart_block_enums.SmartBlockData_Type.OUTLINE_BOXES_WITH_TOP_CIRCLE;
    case 9:
    case "BIG_BULLETS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.BIG_BULLETS;
    case 10:
    case "SMALL_BULLETS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.SMALL_BULLETS;
    case 11:
    case "ARROW_BULLETS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.ARROW_BULLETS;
    case 12:
    case "PROCESS_STEPS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.PROCESS_STEPS;
    case 13:
    case "BAR_STATS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.BAR_STATS;
    case 14:
    case "TIMELINE":
      return import_plugin_smart_block_enums.SmartBlockData_Type.TIMELINE;
    case 15:
    case "MINIMAL_TIMELINE":
      return import_plugin_smart_block_enums.SmartBlockData_Type.MINIMAL_TIMELINE;
    case 16:
    case "PILLS":
      return import_plugin_smart_block_enums.SmartBlockData_Type.PILLS;
    case 17:
    case "STAR_RATING":
      return import_plugin_smart_block_enums.SmartBlockData_Type.STAR_RATING;
    case 18:
    case "QUOTE_BOXES":
      return import_plugin_smart_block_enums.SmartBlockData_Type.QUOTE_BOXES;
    case 19:
    case "CIRCLE":
      return import_plugin_smart_block_enums.SmartBlockData_Type.CIRCLE;
    case 20:
    case "PYRAMID":
      return import_plugin_smart_block_enums.SmartBlockData_Type.PYRAMID;
    case 21:
    case "STAIRCASE":
      return import_plugin_smart_block_enums.SmartBlockData_Type.STAIRCASE;
    case 22:
    case "VERTICAL_FUNNEL":
      return import_plugin_smart_block_enums.SmartBlockData_Type.VERTICAL_FUNNEL;
    case -1:
    case "UNRECOGNIZED":
    default:
      return import_plugin_smart_block_enums.SmartBlockData_Type.UNRECOGNIZED;
  }
}
function smartBlockData_TypeToJSON(object) {
  switch (object) {
    case import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES:
      return "SOLID_BOXES";
    case import_plugin_smart_block_enums.SmartBlockData_Type.NUMBERED_BOXES:
      return "NUMBERED_BOXES";
    case import_plugin_smart_block_enums.SmartBlockData_Type.STATS:
      return "STATS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.CIRCLE_STATS:
      return "CIRCLE_STATS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES_ALTERNATING:
      return "SOLID_BOXES_ALTERNATING";
    case import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_JOINED_BOXES:
      return "SOLID_JOINED_BOXES";
    case import_plugin_smart_block_enums.SmartBlockData_Type.SIDE_LINE_TEXT:
      return "SIDE_LINE_TEXT";
    case import_plugin_smart_block_enums.SmartBlockData_Type.TOP_LINE_TEXT:
      return "TOP_LINE_TEXT";
    case import_plugin_smart_block_enums.SmartBlockData_Type.OUTLINE_BOXES_WITH_TOP_CIRCLE:
      return "OUTLINE_BOXES_WITH_TOP_CIRCLE";
    case import_plugin_smart_block_enums.SmartBlockData_Type.BIG_BULLETS:
      return "BIG_BULLETS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.SMALL_BULLETS:
      return "SMALL_BULLETS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.ARROW_BULLETS:
      return "ARROW_BULLETS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.PROCESS_STEPS:
      return "PROCESS_STEPS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.BAR_STATS:
      return "BAR_STATS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.TIMELINE:
      return "TIMELINE";
    case import_plugin_smart_block_enums.SmartBlockData_Type.MINIMAL_TIMELINE:
      return "MINIMAL_TIMELINE";
    case import_plugin_smart_block_enums.SmartBlockData_Type.PILLS:
      return "PILLS";
    case import_plugin_smart_block_enums.SmartBlockData_Type.STAR_RATING:
      return "STAR_RATING";
    case import_plugin_smart_block_enums.SmartBlockData_Type.QUOTE_BOXES:
      return "QUOTE_BOXES";
    case import_plugin_smart_block_enums.SmartBlockData_Type.CIRCLE:
      return "CIRCLE";
    case import_plugin_smart_block_enums.SmartBlockData_Type.PYRAMID:
      return "PYRAMID";
    case import_plugin_smart_block_enums.SmartBlockData_Type.STAIRCASE:
      return "STAIRCASE";
    case import_plugin_smart_block_enums.SmartBlockData_Type.VERTICAL_FUNNEL:
      return "VERTICAL_FUNNEL";
    default:
      return "UNKNOWN";
  }
}
function smartBlockData_ColumnSizeFromJSON(object) {
  switch (object) {
    case 0:
    case "SMALL":
      return import_plugin_smart_block_enums.SmartBlockData_ColumnSize.SMALL;
    case 1:
    case "MEDIUM":
      return import_plugin_smart_block_enums.SmartBlockData_ColumnSize.MEDIUM;
    case 2:
    case "LARGE":
      return import_plugin_smart_block_enums.SmartBlockData_ColumnSize.LARGE;
    case 3:
    case "EXTRA_LARGE":
      return import_plugin_smart_block_enums.SmartBlockData_ColumnSize.EXTRA_LARGE;
    case -1:
    case "UNRECOGNIZED":
    default:
      return import_plugin_smart_block_enums.SmartBlockData_ColumnSize.UNRECOGNIZED;
  }
}
function smartBlockData_ColumnSizeToJSON(object) {
  switch (object) {
    case import_plugin_smart_block_enums.SmartBlockData_ColumnSize.SMALL:
      return "SMALL";
    case import_plugin_smart_block_enums.SmartBlockData_ColumnSize.MEDIUM:
      return "MEDIUM";
    case import_plugin_smart_block_enums.SmartBlockData_ColumnSize.LARGE:
      return "LARGE";
    case import_plugin_smart_block_enums.SmartBlockData_ColumnSize.EXTRA_LARGE:
      return "EXTRA_LARGE";
    default:
      return "UNKNOWN";
  }
}
const baseSmartBlockData = {
  type: import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES,
  columnSize: import_plugin_smart_block_enums.SmartBlockData_ColumnSize.SMALL
};
const SmartBlockData = {
  fromJSON(object) {
    const message = { ...baseSmartBlockData };
    message.type = object.type !== void 0 && object.type !== null ? smartBlockData_TypeFromJSON(object.type) : import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES;
    message.orientation = object.orientation !== void 0 && object.orientation !== null ? String(object.orientation) : void 0;
    message.columnSize = object.columnSize !== void 0 && object.columnSize !== null ? smartBlockData_ColumnSizeFromJSON(object.columnSize) : import_plugin_smart_block_enums.SmartBlockData_ColumnSize.SMALL;
    message.borderColor = object.borderColor !== void 0 && object.borderColor !== null ? String(object.borderColor) : void 0;
    message.borderWidth = object.borderWidth !== void 0 && object.borderWidth !== null ? Number(object.borderWidth) : void 0;
    message.borderRadius = object.borderRadius !== void 0 && object.borderRadius !== null ? Number(object.borderRadius) : void 0;
    return message;
  },
  toJSON(message) {
    const obj = {};
    message.type !== void 0 && (obj.type = smartBlockData_TypeToJSON(message.type));
    message.orientation !== void 0 && (obj.orientation = message.orientation);
    message.columnSize !== void 0 && (obj.columnSize = smartBlockData_ColumnSizeToJSON(message.columnSize));
    message.borderColor !== void 0 && (obj.borderColor = message.borderColor);
    message.borderWidth !== void 0 && (obj.borderWidth = message.borderWidth);
    message.borderRadius !== void 0 && (obj.borderRadius = message.borderRadius);
    return obj;
  }
};
const baseSmartBlockCellData = {
  type: import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES
};
const SmartBlockCellData = {
  fromJSON(object) {
    const message = { ...baseSmartBlockCellData };
    message.label = object.label !== void 0 && object.label !== null ? String(object.label) : void 0;
    message.shape = object.shape !== void 0 && object.shape !== null ? import_common.Media.fromJSON(object.shape) : void 0;
    message.borderColor = object.borderColor !== void 0 && object.borderColor !== null ? String(object.borderColor) : void 0;
    message.borderWidth = object.borderWidth !== void 0 && object.borderWidth !== null ? Number(object.borderWidth) : void 0;
    message.borderRadius = object.borderRadius !== void 0 && object.borderRadius !== null ? Number(object.borderRadius) : void 0;
    message.type = object.type !== void 0 && object.type !== null ? smartBlockData_TypeFromJSON(object.type) : import_plugin_smart_block_enums.SmartBlockData_Type.SOLID_BOXES;
    message.accentColor = object.accentColor !== void 0 && object.accentColor !== null ? String(object.accentColor) : void 0;
    message.backgroundColor = object.backgroundColor !== void 0 && object.backgroundColor !== null ? String(object.backgroundColor) : void 0;
    message.shapeColor = object.shapeColor !== void 0 && object.shapeColor !== null ? String(object.shapeColor) : void 0;
    return message;
  },
  toJSON(message) {
    const obj = {};
    message.label !== void 0 && (obj.label = message.label);
    message.shape !== void 0 && (obj.shape = message.shape ? import_common.Media.toJSON(message.shape) : void 0);
    message.borderColor !== void 0 && (obj.borderColor = message.borderColor);
    message.borderWidth !== void 0 && (obj.borderWidth = message.borderWidth);
    message.borderRadius !== void 0 && (obj.borderRadius = message.borderRadius);
    message.type !== void 0 && (obj.type = smartBlockData_TypeToJSON(message.type));
    message.accentColor !== void 0 && (obj.accentColor = message.accentColor);
    message.backgroundColor !== void 0 && (obj.backgroundColor = message.backgroundColor);
    message.shapeColor !== void 0 && (obj.shapeColor = message.shapeColor);
    return obj;
  }
};
//# sourceMappingURL=plugin_smart_block.js.map
