
import DietPlanActionTypes from './diet-plan.action.types'


export const clearDietPlanListErrorState = (data=null) => ({
    type: DietPlanActionTypes.FETCH_DIET_PLAN_LIST_CLEAR_ERROR_STATE,
    payload: data
})

export const clearDietPlanState = () => ({
    type: DietPlanActionTypes.RESET_STATE,
    
})

//all operation starters
export const fetchDietPlanListStart = (data) => ({
    type: DietPlanActionTypes.FETCH_DIET_PLAN_START,
    payload: data
})

export const fetchDietPlanListSuccess = (data) => ({
    type: DietPlanActionTypes.FETCH_DIET_PLAN_SUCCESS,
    payload: data
})

export const fetchDietPlanListFailure = (errMsg) => ({
    type: DietPlanActionTypes.CREATE_DIET_PLAN_FAILURE,
    payload: errMsg
})

export const createDietPlanStart = (data) => ({
    type: DietPlanActionTypes.CREATE_DIET_PLAN_START,
    payload: data
})

// all operations callbacks
export const createDietPlanSuccess = (data) => ({
    type: DietPlanActionTypes.CREATE_DIET_PLAN_SUCCESS,
    payload: data
})

export const createDietPlanFailure = (errMsg) => ({
    type: DietPlanActionTypes.CREATE_DIET_PLAN_FAILURE,
    payload: errMsg
})


// all operations callbacks end
