import * as types from '../types/donate.types';

export const changeDonationType = (type) => ({
	type: types.CHANGE_DONATION_TYPE,
	payload: type,
});

export const changeDonationAmount = (amount) => ({
	type: types.CHANGE_DONATION_AMOUNT,
	payload: Number(amount),
});

export const changeDonationAmountOption = (option) => ({
	type: types.CHANGE_DONATION_AMOUNT_OPTION,
	payload: option,
});

export const changeRecurringDonationOptions = (options) => ({
	type: types.CHANGE_RECURRING_DONATION_OPTIONS,
	payload: options,
});

export const changeDonationCurrency = (value) => ({
	type: types.CHANGE_DONATION_CURRENCY,
	payload: value,
});

export const changeSymbolCurrency = (value) => ({
	type: types.CHANGE_SYMBOL_CURRENCY,
	payload: value,
});

export const resetDonate = () => ({
	type: types.RESTART_DONATE_STATE,
  });