import {Button} from "antd";
import React from "react";
import {connect} from "react-redux";
import {createStructuredSelector} from "reselect";
import {setModalContext} from "../../redux/modals/modals.actions";

const mapStateToProps = createStructuredSelector({});

const mapDispatchToProps = (dispatch) => ({
    setRefundPaymentContext: (context) =>
        dispatch(setModalContext({context: context, modal: "refund_payment"})),
});

function Test({setRefundPaymentContext, refundPaymentModal}) {
    console.log("refundPaymentModal", refundPaymentModal);
    return (
        <div>
            <Button
                onClick={() =>
                    setRefundPaymentContext({
                        context: {},
                    })
                }
            >
                Open Modal
            </Button>
        </div>
    );
}

export default connect(mapStateToProps, mapDispatchToProps)(Test);
