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, Menu } from "@blueprintjs/core";
import { createCommandMenu } from "teselagen-react-components";
import getCommands from "../commands";
import { connectToEditor } from "../withEditorProps";
import ToolbarItem from "./ToolbarItem";
import withEditorProps from "../withEditorProps";
export default connectToEditor()(function (_ref) {
  var toolbarItemProps = _ref.toolbarItemProps;
  return /*#__PURE__*/React.createElement(ToolbarItem, _extends({
    tooltip: "导出",
    Dropdown: Dropdown,
    noDropdownIcon: true,
    onIconClick: "toggleDropdown",
    Icon: /*#__PURE__*/React.createElement(Icon, {
      "data-test": "veDownloadTool",
      icon: "import"
    })
  }, toolbarItemProps));
});
var Dropdown = withEditorProps(function (props) {
  return /*#__PURE__*/React.createElement(Menu, null, createCommandMenu(["exportSequenceAsGenbank", "exportSequenceAsFasta", "exportSequenceAsTeselagenJson"], getCommands({
    props: props
  })));
});