import f from "escape-html";
import { BOLD_CLASSES as S } from "../../Plugins/MarkPlugin/BoldPlugin/BoldMarkupElement.es.js";
import { CODE_CLASSES as c } from "../../Plugins/MarkPlugin/CodePlugin/CodeMarkupElement.es.js";
import { ITALIC_CLASSES as m } from "../../Plugins/MarkPlugin/ItalicPlugin/ItalicMarkupElement.es.js";
import { STRIKETHROUGH_CLASSES as $ } from "../../Plugins/MarkPlugin/StrikethroughPlugin/StrikethroughMarkupElement.es.js";
import { UNDERLINE_CLASSES as E } from "../../Plugins/MarkPlugin/UnderlinePlugin/UnderlineMarkupElement.es.js";
const _ = (r) => {
  let s = f(r.text);
  s === "" && (s = "&#xFEFF;"), s = s.replaceAll(`
`, "<br />&#xFEFF;");
  const { bold: i, italic: a, underline: o, strikethrough: t, code: l, subscript: e, superscript: n, color: p } = r;
  return i && (s = `<span class="${S}">${s}</span>`), a && (s = `<span class="${m}">${s}</span>`), o && (s = `<span class="${E}">${s}</span>`), t && (s = `<span class="${$}">${s}</span>`), l && (s = `<span class="${c}">${s}</span>`), p && (s = `<span style="color: ${p}">${s}</span>`), e ? s = `<sub>${s}</sub>` : n && (s = `<sup>${s}</sup>`), s;
};
export {
  _ as serializeLeafToHtml
};
//# sourceMappingURL=serializeLeafToHtml.es.js.map
