import { connect } from 'react-redux';
import { withRouter } from 'react-router';

import Refresher from '../../components/Refresher/Refresher';
// import { selectRefresher, searchRefresherBegin } from '../../redux/branches/entities/';
import {
  setUserUuid,
  selectUserUuid
} from '../../redux/branches/entities/user';
import {
  getPatient,
  selectPatientUuid
} from '../../redux/branches/entities/patient';

export const mapDispatchToProps = {
  setUserUuid,
  getPatient
};

export const mapStateToProps = state => ({
  patient: selectPatientUuid(state),
  user: selectUserUuid(state)
});

export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Refresher));
