"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
var 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. */
var codemirror_static_1 = require("@cocalc/frontend/jupyter/codemirror-static");
var util_1 = require("lib/share/util");
var file_extensions_1 = require("@cocalc/frontend/file-extensions");
function CodeMirror(_a) {
    var content = _a.content, filename = _a.filename, options = _a.options, fontSize = _a.fontSize;
    var ext = (0, util_1.getExtension)(filename);
    var mode = (0, file_extensions_1.codemirrorMode)(ext);
    return ((0, jsx_runtime_1.jsx)(codemirror_static_1.CodeMirrorStatic, { value: content, font_size: fontSize, options: __assign({ lineNumbers: true, mode: mode }, options) }));
}
exports.default = CodeMirror;
//# sourceMappingURL=codemirror.js.map