import * as React from 'react';
import { forwardRef } from '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$$')));
}
export default forwardRef(EquationEditor);
//# sourceMappingURL=EquationEditor.js.map