"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

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

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

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

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

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

const mapStateToProps = state => ({
  isPending: (0, _reducers.isLoginPending)(state),
  isSuccess: (0, _reducers.isLoginSuccess)(state),
  username: (0, _reducers.getLoginUsername)(state),
  error: (0, _reducers.getLoginError)(state)
});

const mapDispatchToProps = {
  login: _login.login
};

var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_LoginForm.default);

exports.default = _default;