import containerConnect from 'Framework/ComponentContainer';
import Confirm from '../Components/Confirm';
import { hideConfirm } from '../../../Reducers/Confirm/Actions';

const mapStateToProps = ({ confirm }) => {
    return {
        Component: Confirm,
        confirm: confirm,
    };
};

const mapDispatchToProps = dispatch => ({
    onOk: () => dispatch(hideConfirm(true)),
    onCancel: () => dispatch(hideConfirm(false)),
});

export default containerConnect(mapStateToProps, mapDispatchToProps);
