import { Action } from 'lib/types/interfaces';


export const postComment = (payload?, dataToAlter?) => ({
	type: '@@comments::POST_NEW',
	payload: payload,
	dataToAlter: dataToAlter
}) as Action;


export const postedComment = (data?) => ({
	type: '@@comments::POSTED_NEW',
	...data
}) as Action;


export const failedPostComment = (error?) => ({
	type: '@@comments::FAILED_POST_NEW',
	...error
}) as Action;


export const editComment = (payload?, dataToAlter?) => ({
	type: '@@comments::EDIT',
	payload: payload,
	dataToAlter: dataToAlter
}) as Action;


export const editedComment = (data?) => ({
	type: '@@comments::EDITTED',
	...data
}) as Action;


export const failedEditComment = (error?) => ({
	type: '@@comments::FAILED_EDIT',
	...error
}) as Action;


export const deleteComment = (payload?, dataToAlter?) => ({
	type: '@@comments::DELETE',
	payload: payload,
	dataToAlter: dataToAlter
}) as Action;


export const deletedComment = (data?) => ({
	type: '@@comments::DELETED',
	...data
}) as Action;


export const failedDeleteComment = (error?) => ({
	type: '@@comments::FAILED_DELETE',
	...error
}) as Action;


