import React from "react";
import { connect } from "redux-bundler-react";
import { SidebarButton } from "../../application-controls/index";

class zoomIndicator extends React.Component {
  constructor(props) {
    super(props);
    this.handleClick = this.handleClick.bind(this);
  }
  handleClick() {}
  render() {
     const {mapZoom, zoomLevelIndicator} = this.props;

    if (zoomLevelIndicator == true){
        return (
        <SidebarButton
         iconText={Math.floor(mapZoom)}
          label="Zoom-Indicator"
          title="Zoom-Indicator"
          onClick={this.handleClick}
       />
     );
    }
    else{ 
        return (null);
      }
  }
}

export default connect(
  'doZoomIndicatorActivate',
  'selectMapZoom',
  'selectZoomLevelIndicator',
  zoomIndicator
);
