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

import ImageGallery, { StateProps, DispatchProps, OwnProps } from './ImageGallery';

const mapStateToProps = (state: StoreState) => ({
  active: state.app.dialogs.custom.active,
});

const mapDispatchToProps = {
  dialogHide: app.actions.dialog.hide.action,
};

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

export default Wrapped;
