import React from 'react';
import { connect } from 'react-redux';
import Button from 'antd/es/button';
import 'antd/es/button/style';
var ButtonGroup = Button.Group;
import { setZoom } from '../../../../core/controlsBus/actions';
import { getValuesState } from '../../../../core/controlsBus/selectors';
import './index.less';

var ZoomControl = function ZoomControl(_ref) {
  var zoom = _ref.zoom,
      setZoom = _ref.setZoom;
  var step = 0.1; //TODO: doesn't work proper scaling

  return null;
  return React.createElement("div", {
    className: 'ZoomControl'
  }, React.createElement(ButtonGroup, {
    size: 'small'
  }, React.createElement(Button, {
    icon: "zoom-out",
    disabled: zoom <= step,
    onClick: function onClick() {
      return setZoom(zoom - step);
    }
  }), React.createElement(Button, {
    icon: "border",
    disabled: zoom === 1,
    onClick: function onClick() {
      return setZoom(1);
    }
  }), React.createElement(Button, {
    icon: "zoom-in",
    onClick: function onClick() {
      return setZoom(zoom + step);
    }
  })));
};

var mapStateToProps = function mapStateToProps(state) {
  var _getValuesState = getValuesState(state),
      diagramZoom = _getValuesState.diagramZoom;

  return {
    zoom: diagramZoom
  };
};

var mapDispatchToProps = {
  setZoom: setZoom
};
export default connect(mapStateToProps, mapDispatchToProps)(ZoomControl);