import * as ActionTypes from '../actionTypes'
import {
  SetRelayMapAction,
  SetRelayInfoAction,
  SetRelayMapUpdatedAction
} from './types'
import { RelayMap, RelayInfoObject } from '../../types'

export const setRelayMapAction = (payload: RelayMap): SetRelayMapAction => ({
  type: ActionTypes.SET_RELAY_MAP,
  payload
})

export const setRelayInfoAction = (
  payload: RelayInfoObject
): SetRelayInfoAction => ({
  type: ActionTypes.SET_RELAY_INFO,
  payload
})

export const setRelayMapUpdatedAction = (): SetRelayMapUpdatedAction => ({
  type: ActionTypes.SET_RELAY_MAP_UPDATED
})
