"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
/*
 *  This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
 *  License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details
 */
/* Static codemirror-based renderer. */
const codemirror_static_1 = require("@cocalc/frontend/jupyter/codemirror-static");
const util_1 = require("lib/share/util");
const file_extensions_1 = require("@cocalc/frontend/file-extensions");
function CodeMirror({ content, filename, options, fontSize, }) {
    const ext = (0, util_1.getExtension)(filename);
    const mode = (0, file_extensions_1.codemirrorMode)(ext);
    return ((0, jsx_runtime_1.jsx)(codemirror_static_1.CodeMirrorStatic, { value: content, font_size: fontSize, options: { lineNumbers: true, mode, ...options } }));
}
exports.default = CodeMirror;
//# sourceMappingURL=codemirror.js.map