import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Tabs } from '@redux-devtools/ui';
import { monitors } from '../utils/getMonitor';
import { selectMonitor } from '../actions';
class MonitorSelector extends Component {
  shouldComponentUpdate(nextProps) {
    return nextProps.selected !== this.props.selected;
  }
  render() {
    return /*#__PURE__*/React.createElement(Tabs, {
      main: true,
      collapsible: true,
      position: "center",
      tabs: monitors,
      onClick: this.props.selectMonitor,
      selected: this.props.selected || 'InspectorMonitor'
    });
  }
}
const mapStateToProps = state => ({
  selected: state.monitor.selected
});
const actionCreators = {
  selectMonitor
};
export default connect(mapStateToProps, actionCreators)(MonitorSelector);