"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const react_1 = require("react");
function EquationEditor({ equation, inline, setEquation }, forwardedRef) {
    const onChange = (event) => {
        setEquation(event.target.value);
    };
    return inline && forwardedRef instanceof HTMLInputElement ? (React.createElement("span", { className: 'EquationEditor_inputBackground' },
        React.createElement("span", { className: 'EquationEditor_dollarSign' }, "$"),
        React.createElement("input", { ref: forwardedRef, autoFocus: true, className: 'EquationEditor_inlineEditor', onChange: onChange, value: equation }),
        React.createElement("span", { className: 'EquationEditor_dollarSign' }, "$"))) : (React.createElement("div", { className: 'EquationEditor_inputBackground' },
        React.createElement("span", { className: 'EquationEditor_dollarSign' }, '$$\n'),
        React.createElement("textarea", { ref: forwardedRef, className: 'EquationEditor_blockEditor', onChange: onChange, value: equation }),
        React.createElement("span", { className: 'EquationEditor_dollarSign' }, '\n$$')));
}
exports.default = (0, react_1.forwardRef)(EquationEditor);
//# sourceMappingURL=EquationEditor.js.map