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 { MenuItem } from "@blueprintjs/core";
import tgUseLocalStorageState from "tg-use-local-storage-state";
var useShowChromQualScores = function useShowChromQualScores() {
  return tgUseLocalStorageState("showChromQualScores", {
    defaultValue: true
  });
};
var ShowChromQualScoresMenu = function ShowChromQualScoresMenu() {
  return function ShowChromQualScoresMenu(props) {
    var _useShowChromQualScor = useShowChromQualScores(),
      showChromQualScores = _useShowChromQualScor[0],
      setShowChromQualScores = _useShowChromQualScor[1];
    return /*#__PURE__*/React.createElement(MenuItem, _extends({}, props, {
      text: "Show Quality Scores",
      shouldDismissPopover: false,
      onClick: function onClick() {
        setShowChromQualScores(!showChromQualScores);
      },
      icon: showChromQualScores ? "small-tick" : "blank"
    }));
  };
};
var chromatogramMenu = {
  text: "Chromatogram (Quality Scores)",
  cmd: "showChromQualScoresMenu",
  component: ShowChromQualScoresMenu(),
  shouldDismissPopover: false
};
export { chromatogramMenu, useShowChromQualScores };