"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 consts_exports = {};
__export(consts_exports, {
  BlockType: () => BlockType,
  ENTITY_DECORATION_TO_MUTABILITY: () => ENTITY_DECORATION_TO_MUTABILITY,
  FROM_DRAFT_LIST_TYPE: () => FROM_DRAFT_LIST_TYPE,
  FROM_RICOS_DECORATION_TYPE: () => FROM_RICOS_DECORATION_TYPE,
  FROM_RICOS_ENTITY_TYPE: () => FROM_RICOS_ENTITY_TYPE,
  HeaderLevel: () => HeaderLevel,
  TO_DRAFT_LIST_TYPE: () => TO_DRAFT_LIST_TYPE,
  TO_RICOS_DATA_FIELD: () => TO_RICOS_DATA_FIELD,
  TO_RICOS_DECORATION_DATA_FIELD: () => TO_RICOS_DECORATION_DATA_FIELD,
  TO_RICOS_DECORATION_TYPE: () => TO_RICOS_DECORATION_TYPE,
  TO_RICOS_INLINE_STYLE_TYPE: () => TO_RICOS_INLINE_STYLE_TYPE,
  TO_RICOS_NODE_TYPE: () => TO_RICOS_NODE_TYPE,
  TO_RICOS_PLUGIN_TYPE: () => TO_RICOS_PLUGIN_TYPE
});
module.exports = __toCommonJS(consts_exports);
var import_v1 = require("./../../../ricos-schema/legacy/wix/rich_content/v1/index.js");
var import_consts = require("../../consts.js");
var import_utils = require("../../utils.js");
var BlockType = /* @__PURE__ */ ((BlockType2) => {
  BlockType2["Unstyled"] = "unstyled";
  BlockType2["HeaderOne"] = "header-one";
  BlockType2["HeaderTwo"] = "header-two";
  BlockType2["HeaderThree"] = "header-three";
  BlockType2["HeaderFour"] = "header-four";
  BlockType2["HeaderFive"] = "header-five";
  BlockType2["HeaderSix"] = "header-six";
  BlockType2["UnorderedListItem"] = "unordered-list-item";
  BlockType2["OrderedListItem"] = "ordered-list-item";
  BlockType2["Blockquote"] = "blockquote";
  BlockType2["CodeBlock"] = "code-block";
  BlockType2["Atomic"] = "atomic";
  return BlockType2;
})(BlockType || {});
var HeaderLevel = /* @__PURE__ */ ((HeaderLevel2) => {
  HeaderLevel2[HeaderLevel2["header-one"] = 1] = "header-one";
  HeaderLevel2[HeaderLevel2["header-two"] = 2] = "header-two";
  HeaderLevel2[HeaderLevel2["header-three"] = 3] = "header-three";
  HeaderLevel2[HeaderLevel2["header-four"] = 4] = "header-four";
  HeaderLevel2[HeaderLevel2["header-five"] = 5] = "header-five";
  HeaderLevel2[HeaderLevel2["header-six"] = 6] = "header-six";
  return HeaderLevel2;
})(HeaderLevel || {});
const FROM_DRAFT_LIST_TYPE = {
  ["unordered-list-item" /* UnorderedListItem */]: import_v1.Node_Type.BULLETED_LIST,
  ["ordered-list-item" /* OrderedListItem */]: import_v1.Node_Type.ORDERED_LIST
};
const TO_DRAFT_LIST_TYPE = (0, import_utils.fromEntries)(
  Object.entries(FROM_DRAFT_LIST_TYPE).map(([key, value]) => [value, key])
);
const TO_RICOS_NODE_TYPE = {
  [import_consts.LINK_BUTTON_TYPE]: import_v1.Node_Type.BUTTON,
  [import_consts.ACTION_BUTTON_TYPE]: import_v1.Node_Type.BUTTON,
  [import_consts.DIVIDER_TYPE]: import_v1.Node_Type.DIVIDER,
  [import_consts.FILE_UPLOAD_TYPE]: import_v1.Node_Type.FILE,
  [import_consts.GALLERY_TYPE]: import_v1.Node_Type.GALLERY,
  [import_consts.GIPHY_TYPE]: import_v1.Node_Type.GIF,
  [import_consts.HTML_TYPE]: import_v1.Node_Type.HTML,
  [import_consts.IMAGE_TYPE]: import_v1.Node_Type.IMAGE,
  [import_consts.IMAGE_TYPE_LEGACY]: import_v1.Node_Type.IMAGE,
  [import_consts.COLLAPSIBLE_LIST_TYPE]: import_v1.Node_Type.COLLAPSIBLE_LIST,
  [import_consts.LINK_PREVIEW_TYPE]: import_v1.Node_Type.LINK_PREVIEW,
  [import_consts.APP_EMBED_TYPE]: import_v1.Node_Type.APP_EMBED,
  [import_consts.VIDEO_TYPE]: import_v1.Node_Type.VIDEO,
  [import_consts.AUDIO_TYPE]: import_v1.Node_Type.AUDIO,
  [import_consts.VIDEO_TYPE_LEGACY]: import_v1.Node_Type.VIDEO,
  [import_consts.POLL_TYPE]: import_v1.Node_Type.POLL,
  [import_consts.TABLE_TYPE]: import_v1.Node_Type.TABLE,
  [import_consts.EMBED_TYPE]: import_v1.Node_Type.EMBED,
  [import_consts.EXTERNAL]: import_v1.Node_Type.EXTERNAL
};
const DUPLICATE_KEYS = [import_consts.IMAGE_TYPE_LEGACY, import_consts.VIDEO_TYPE_LEGACY];
const FROM_RICOS_ENTITY_TYPE = (0, import_utils.fromEntries)(
  Object.entries(TO_RICOS_NODE_TYPE).filter(([key]) => !DUPLICATE_KEYS.includes(key)).map(([key, value]) => [value, key])
);
const TO_RICOS_DECORATION_TYPE = {
  BOLD: import_v1.Decoration_Type.BOLD,
  ITALIC: import_v1.Decoration_Type.ITALIC,
  UNDERLINE: import_v1.Decoration_Type.UNDERLINE,
  [import_consts.SPOILER_TYPE]: import_v1.Decoration_Type.SPOILER,
  [import_consts.ANCHOR_TYPE]: import_v1.Decoration_Type.ANCHOR,
  [import_consts.MENTION_TYPE]: import_v1.Decoration_Type.MENTION,
  [import_consts.LINK_TYPE]: import_v1.Decoration_Type.LINK,
  [import_consts.EXTERNAL]: import_v1.Decoration_Type.EXTERNAL
};
const TO_RICOS_INLINE_STYLE_TYPE = {
  BOLD: { type: import_v1.Decoration_Type.BOLD, fontWeightValue: 700 },
  NOT_BOLD: { type: import_v1.Decoration_Type.BOLD, fontWeightValue: 400 },
  ITALIC: { type: import_v1.Decoration_Type.ITALIC, italicData: true },
  NOT_ITALIC: { type: import_v1.Decoration_Type.ITALIC, italicData: false },
  UNDERLINE: { type: import_v1.Decoration_Type.UNDERLINE, underlineData: true },
  NOT_UNDERLINE: { type: import_v1.Decoration_Type.UNDERLINE, underlineData: false }
};
const TO_RICOS_PLUGIN_TYPE = {
  ...TO_RICOS_NODE_TYPE,
  ...TO_RICOS_DECORATION_TYPE
};
const FROM_RICOS_DECORATION_TYPE = (0, import_utils.fromEntries)(
  Object.entries(TO_RICOS_DECORATION_TYPE).map(([key, value]) => [value, key])
);
const ENTITY_DECORATION_TO_MUTABILITY = {
  [import_consts.ANCHOR_TYPE]: "MUTABLE",
  [import_consts.LINK_TYPE]: "MUTABLE",
  [import_consts.MENTION_TYPE]: "SEGMENTED",
  EMOJI_TYPE: "IMMUTABLE"
};
const DRAFT_BLOCK_TYPE_TO_DATA_FIELD = {
  ["unstyled" /* Unstyled */]: "paragraphData",
  ["unordered-list-item" /* UnorderedListItem */]: "paragraphData",
  ["ordered-list-item" /* OrderedListItem */]: "paragraphData",
  ["header-one" /* HeaderOne */]: "headingData",
  ["header-two" /* HeaderTwo */]: "headingData",
  ["header-three" /* HeaderThree */]: "headingData",
  ["header-four" /* HeaderFour */]: "headingData",
  ["header-five" /* HeaderFive */]: "headingData",
  ["header-six" /* HeaderSix */]: "headingData",
  ["code-block" /* CodeBlock */]: "codeBlockData",
  ["blockquote" /* Blockquote */]: "paragraphData"
};
const DRAFT_PLUGIN_TYPE_TO_DATA_FIELD = (0, import_utils.fromEntries)(
  Object.entries(TO_RICOS_NODE_TYPE).map(([key, value]) => [
    key,
    import_consts.RICOS_NODE_TYPE_TO_DATA_FIELD[value]
  ])
);
const ENTITY_DECORATION_TO_DATA_FIELD = {
  [import_consts.ANCHOR_TYPE]: "anchorData",
  [import_consts.LINK_TYPE]: "linkData",
  [import_consts.MENTION_TYPE]: "mentionData",
  EMOJI_TYPE: "emojiData"
};
const DECORATION_TO_DATA_FIELD = {
  COLOR: "colorData",
  FONT_SIZE: "fontSizeData"
};
const TO_RICOS_DECORATION_DATA_FIELD = {
  ...ENTITY_DECORATION_TO_DATA_FIELD,
  ...DECORATION_TO_DATA_FIELD
};
const TO_RICOS_DATA_FIELD = {
  ...TO_RICOS_DECORATION_DATA_FIELD,
  ...DRAFT_PLUGIN_TYPE_TO_DATA_FIELD,
  ...DRAFT_BLOCK_TYPE_TO_DATA_FIELD
};
//# sourceMappingURL=consts.js.map
