function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from "react";
import { Icon } from "@blueprintjs/core";
import ToolbarItem from "./ToolbarItem";
import { connectToEditor } from "../withEditorProps";
export default connectToEditor(function (editorState) {
  return {
    disabled: !(editorState.sequenceDataHistory && editorState.sequenceDataHistory.future && editorState.sequenceDataHistory.future.length)
  };
})(function (_ref) {
  var toolbarItemProps = _ref.toolbarItemProps,
    redo = _ref.redo,
    disabled = _ref.disabled;
  return /*#__PURE__*/React.createElement(ToolbarItem, _extends({
    Icon: /*#__PURE__*/React.createElement(Icon, {
      "data-test": "veRedoTool",
      icon: "redo"
    }),
    disabled: disabled,
    onIconClick: redo,
    tooltip: /*#__PURE__*/React.createElement("span", null, "Redo ", /*#__PURE__*/React.createElement("span", {
      style: {
        fontSize: 10
      }
    }, "(Cmd/Ctrl+Shift+Z)"))
  }, toolbarItemProps));
});