import {connect} from 'react-redux';
import {add_dialog_msg, toggle_loading} from '../../actions';
import ActionLinkAdd from '../../components/AdminPage/ActionLinkAdd';

const mapStateToProps = (state) => ({
	i18n: state.i18n
});

const mapDispatchToProps = (dispatch, ownProps) => ({
	showDialog: (msg) => {
		dispatch(add_dialog_msg(msg));
	},
	toggleLoading: (active = false) => {
		dispatch(toggle_loading(active));
	}
})

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