import { Action } from 'lib/types/interfaces';


export const fetchUser = (username?) => ({
	type: '@@user::FETCH',
	username: username
}) as Action;


export const fetchedUser = (data?) => ({
	type: '@@user::FETCHED',
	...data
}) as Action;


export const failedFetchUser = (error?) => ({
	type: '@@user::FAILED_FETCH',
	...error
}) as Action;



export const fetchMyAds = () => ({
	type: '@@user::FETCH_MY_ADS',
}) as Action;


export const fetchedMyAds = (data?) => ({
	type: '@@user::FETCHED_MY_ADS',
	...data
}) as Action;


export const failedFetchMyAds = (error?) => ({
	type: '@@user::FAILED_FETCH_MY_ADS',
	...error
}) as Action;



export const fetchMyShops = () => ({
	type: '@@user::FETCH_MY_SHOPS',
}) as Action;


export const fetchedMyShops = (data?) => ({
	type: '@@user::FETCHED_MY_SHOPS',
	...data
}) as Action;


export const failedFetchMyShops = (error?) => ({
	type: '@@user::FAILED_FETCH_MY_SHOPS',
	...error
}) as Action;



export const fetchMyFavorites = () => ({
	type: '@@user::FETCH_MY_FAVORITES',
}) as Action;


export const fetchedMyFavorites = (data?) => ({
	type: '@@user::FETCHED_MY_FAVORITES',
	...data
}) as Action;


export const failedFetchMyFavorites = (error?) => ({
	type: '@@user::FAILED_FETCH_MY_FAVORITES',
	...error
}) as Action;


