import * as ActionTypes from '../actionTypes'
import { RestoreState } from '../actions'
import { ServerMap } from '../../types'

export type FileServersState = {
  map?: ServerMap
  mapUpdated?: number
}

export interface SetServerMapAction {
  type: typeof ActionTypes.SET_SERVER_MAP
  payload: ServerMap
}

export interface SetServerMapUpdatedAction {
  type: typeof ActionTypes.SET_SERVER_MAP_UPDATED
}

export type ServersDispatchTypes =
  | SetServerMapAction
  | SetServerMapUpdatedAction
  | RestoreState
