'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _Button = require('../../Button');

var _Button2 = _interopRequireDefault(_Button);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var BottomSlider = function BottomSlider(_ref) {
  var className = _ref.className,
      currentSlide = _ref.currentSlide,
      slideCount = _ref.slideCount,
      goToSlide = _ref.goToSlide;

  var res = [];

  var _loop = function _loop(index) {
    res.push(_react2.default.createElement(
      _Button2.default,
      {
        onClick: function onClick() {
          return goToSlide(index);
        },
        variant: 'dash-lagoon',
        active: index === currentSlide,
        key: 'Dec' + index + ' ' + slideCount
      },
      index
    ));
  };

  for (var index = 0; index < slideCount; index += 1) {
    _loop(index);
  }
  return _react2.default.createElement(
    'div',
    { className: className },
    res
  );
};

BottomSlider.propTypes = {
  /** @ignore */
  className: _propTypes2.default.string,
  currentSlide: _propTypes2.default.number,
  slideCount: _propTypes2.default.number,
  goToSlide: _propTypes2.default.func
};

BottomSlider.defaultProps = {
  className: undefined,
  currentSlide: 0,
  slideCount: 0,
  goToSlide: null
};

exports.default = BottomSlider;
module.exports = exports['default'];