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 { Icon } from "@blueprintjs/core";
import React from "react";
import ToolbarItem from "./ToolbarItem";
import { connectToEditor } from "../withEditorProps";
export default connectToEditor(function (editorState) {
  return {
    isHidden: editorState.sequenceData && editorState.sequenceData.isProtein,
    toggled: editorState.annotationVisibility && editorState.annotationVisibility.primers
  };
})(function (_ref) {
  var toolbarItemProps = _ref.toolbarItemProps,
    isHidden = _ref.isHidden,
    toggled = _ref.toggled,
    annotationVisibilityToggle = _ref.annotationVisibilityToggle;
  return /*#__PURE__*/React.createElement(ToolbarItem, _extends({
    Icon: /*#__PURE__*/React.createElement(Icon, {
      icon: "swap-horizontal"
    }),
    onIconClick: function onIconClick() {
      annotationVisibilityToggle("primers");
    },
    isHidden: isHidden,
    toggled: toggled,
    tooltip: "显示引物",
    tooltipToggled: "隐藏引物"
  }, toolbarItemProps));
});