'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

require('./style.css');

require('../../css-libraries/ionicons/css/ionicons.css');

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

/* internal dependencies*/
var HeaderBarButton = function HeaderBarButton(_ref) {
  var buttonType = _ref.buttonType,
      buttonTitle = _ref.buttonTitle,
      buttonColor = _ref.buttonColor,
      onClick = _ref.onClick;

  // const handleViewButtonClick = (ViewWindowElement)=>{
  //    ViewWindowElement.classList.add('HeaderBar-ViewWindow-Max');
  // }

  var renderButtonIcon = function renderButtonIcon() {
    switch (buttonType) {
      case 'view':
        return _react2.default.createElement(
          'div',
          {
            onClick: onClick,
            className: 'HeaderBarButton-Icon ' + buttonColor },
          _react2.default.createElement('i', { className: 'ion-ios-play HeaderBarButton-Icon-Icon' })
        );
        break;
      case 'save':
        return _react2.default.createElement(
          'div',
          {
            className: 'HeaderBarButton-Icon ' + buttonColor },
          _react2.default.createElement('i', { className: 'ion-ios-download HeaderBarButton-Icon-Icon' })
        );
      case 'theme':
        return _react2.default.createElement(
          'div',
          {
            className: 'HeaderBarButton-Icon ' + buttonColor },
          _react2.default.createElement('i', { className: 'ion-waterdrop HeaderBarButton-Icon-Icon' })
        );
      case 'share':
        return _react2.default.createElement(
          'div',
          {
            className: 'HeaderBarButton-Icon ' + buttonColor },
          _react2.default.createElement('i', { className: 'ion-share HeaderBarButton-Icon-Icon' })
        );
      default:

    }
  };

  return _react2.default.createElement(
    'div',
    { className: 'HeaderBarButton' },
    renderButtonIcon(),
    _react2.default.createElement(
      'div',
      { className: 'HeaderBarButton-Title' },
      buttonTitle
    )
  );
}; /* external dependencies*/


HeaderBarButton.propTypes = {
  buttonType: _react2.default.PropTypes.string.isRequired,
  buttonTitle: _react2.default.PropTypes.string.isRequired,
  buttonColor: _react2.default.PropTypes.string.isRequired,
  onClick: _react2.default.PropTypes.func.isRequired
};

exports.default = HeaderBarButton;