import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import { HtmlDiff } from './diff/index.js';
import './index.scss';
export { escapeDiffHTML, unescapeDiffHTML } from './escapeHtml.js';
const baseClass = 'html-diff';
export const getHTMLDiffComponents = ({ fromHTML, postProcess, toHTML, tokenizeByCharacter })=>/**
   * Optional function to transform the HTML output after diffing.
   * Useful for converting escape sequences to HTML entities.
   */ {
    const diffHTML = new HtmlDiff(fromHTML, toHTML, {
        tokenizeByCharacter
    });
    let [oldHTML, newHTML] = diffHTML.getSideBySideContents();
    if (postProcess) {
        oldHTML = postProcess(oldHTML);
        newHTML = postProcess(newHTML);
    }
    const From = oldHTML ? /*#__PURE__*/ _jsxDEV("div", {
        className: `${baseClass}__diff-old html-diff`,
        dangerouslySetInnerHTML: {
            __html: oldHTML
        }
    }, void 0, false, {
        fileName: "src/elements/HTMLDiff/index.tsx",
        lineNumber: 40,
        columnNumber: 5
    }, this) : null;
    const To = newHTML ? /*#__PURE__*/ _jsxDEV("div", {
        className: `${baseClass}__diff-new html-diff`,
        dangerouslySetInnerHTML: {
            __html: newHTML
        }
    }, void 0, false, {
        fileName: "src/elements/HTMLDiff/index.tsx",
        lineNumber: 47,
        columnNumber: 5
    }, this) : null;
    return {
        From,
        To
    };
};

//# sourceMappingURL=index.js.map