import { Action } from 'lib/types/interfaces';




export const fetchMultipleNews = (data?, options?: Record<string, any>) => ({
	type: '@@news::FETCH_MULTIPLE',
	data,
	options,
}) as Action;

export const fetchedMultipleNews = (data?) => ({
	type: '@@news::FETCHED_MULTIPLE',
	...data
}) as Action;


export const failedFetchMultipleNews = (error?) => ({
	type: '@@news::FAILED_FETCH_MULTIPLE',
	...error
}) as Action;



export const fetchSingleNews = (data?: string, options?: Record<string, any>) => ({
	type: '@@news::FETCH_SINGLE',
	data,
	options
}) as Action;


export const fetchedSingleNews = (data?) => ({
	type: '@@news::FETCHED_SINGLE',
	...data
}) as Action;


export const failedFetchSingleNews = (error?) => ({
	type: '@@news::FAILED_FETCH_SINGLE',
	...error
}) as Action;




export const fetchNewsCategories = () => ({
	type: '@@news::FETCH_CATEGORIES'
}) as Action;


export const fetchedNewsCategories = (data?) => ({
	type: '@@news::FETCHED_CATEGORIES',
	...data
}) as Action;


export const failedFetchNewsCategories = (error?) => ({
	type: '@@news::FAILED_FETCH_CATEGORIES',
	...error
}) as Action;
