'use strict';

var jsxRuntime = require('react/jsx-runtime');

// default tag renderers
const defaultTagRenderers = {
    // text Stong
    strong: (chunks) => jsxRuntime.jsx("strong", { children: chunks }),
    // text Emphasis
    em: (chunks) => jsxRuntime.jsx("em", { children: chunks }),
    // text Underline
    u: (chunks) => jsxRuntime.jsx("u", { children: chunks }),
    // text Mark
    mark: (chunks) => jsxRuntime.jsx("mark", { className: "bg-purple-300 dark:bg-purple-500 text-neutral-800 dark:text-neutral-300 px-1 rounded", children: chunks }),
    // text Delete
    del: (chunks) => jsxRuntime.jsx("del", { children: chunks }),
    // text Subscript
    sub: (chunks) => jsxRuntime.jsx("sub", { children: chunks }),
    // text Superscript
    sup: (chunks) => jsxRuntime.jsx("sup", { children: chunks }),
};
// create rich text renderer
function createRichTextRenderer(customRenderers) {
    const renderers = Object.assign(Object.assign({}, defaultTagRenderers), customRenderers);
    return function richText(t, key) {
        return t.rich(key, renderers);
    };
}
// default rich text renderer
const richText = createRichTextRenderer();

exports.createRichTextRenderer = createRichTextRenderer;
exports.richText = richText;
