"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = ToolbarPlugin;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _react = _interopRequireDefault(require("react"));

var _editorAndToolbar = _interopRequireDefault(require("./editor-and-toolbar"));

/**
 * Adds a toolbar which is shown when the editor is focused.
 * @param {*} opts
 */
function ToolbarPlugin(opts) {
  return {
    /* eslint-disable-next-line */
    renderEditor: function renderEditor(props) {
      return /*#__PURE__*/_react["default"].createElement(_editorAndToolbar["default"], (0, _extends2["default"])({}, props, {
        mainEditorRef: opts.mainEditorRef,
        disableScrollbar: opts.disableScrollbar,
        disableUnderline: opts.disableUnderline,
        autoWidth: opts.autoWidth,
        onDone: opts.onDone
      }));
    }
  };
}
//# sourceMappingURL=index.js.map