'use strict';

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

var _reactRedux = require('react-redux');

var _LoginForm = require('../../components/login/LoginForm');

var _LoginForm2 = _interopRequireDefault(_LoginForm);

var _login = require('../../actions/login');

var _reducers = require('../../reducers');

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

var mapStateToProps = function mapStateToProps(state) {
  return {
    isPending: (0, _reducers.isLoginPending)(state),
    username: (0, _reducers.getLoginUsername)(state),
    response: (0, _reducers.getLoginResponse)(state),
    error: (0, _reducers.getLoginError)(state)
  };
};

var mapDispatchToProps = {
  onSubmit: _login.login
};

exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_LoginForm2.default);