import * as ActionTypes from './actionTypes'
import { State } from './rootReducer'

export * from './auth/action'
export * from './metadata/action'
export * from './relays/action'
export * from './userAppData/action'

export const restoreState = (payload: State) => {
  return {
    type: ActionTypes.RESTORE_STATE,
    payload
  }
}

export interface RestoreState {
  type: typeof ActionTypes.RESTORE_STATE
  payload: State
}

export interface UserLogout {
  type: typeof ActionTypes.USER_LOGOUT
}

export const userLogOutAction = () => {
  return {
    type: ActionTypes.USER_LOGOUT
  }
}
