import { connect } from 'react-redux';
import { StoreState } from 'store/rootReducer';
import generic from 'store/generic';

import file from 'store/file';
import UploadCmsImageForm, { StateProps, DispatchProps, OwnProps } from './UploadCmsImageForm';

const mapStateToProps = (state: StoreState): {} => ({});

const mapDispatchToProps = {
  uploadS3: generic.actions.uploadS3Url.request.action,
  upload: generic.actions.upload.request.action,
  uploadApollo: file.actions.upload.request.action,
};

const Wrapped = connect<StateProps, DispatchProps, OwnProps>(
  mapStateToProps,
  mapDispatchToProps,
)(UploadCmsImageForm);

export default Wrapped;
