import POGOProtos from 'pogo-protos';

import { ILeaguePokemon } from 'app/models/League';
import { IPokemon } from 'app/models/Pokemon';

export interface IPokemonSelectListState {
    isLoading : boolean;
    activePokemonId : POGOProtos.Enums.PokemonId | null;
    activePokemonForm : POGOProtos.Enums.Form | null;
    pokemonList : Array<IPokemon>;
    pokemonListFiltered : Array<IPokemon>;
    filterTerm : string;
    pokemonLeagueStats : { [id in keyof typeof POGOProtos.Enums.PokemonId]? : ILeaguePokemon };
}

export const PokemonSelectListActionTypes = {
    SET_IS_LOADING: 'POKEMON_SELECT_LIST/SET_IS_LOADING',
    SET_POKEMON_LIST: 'POKEMON_SELECT_LIST/SET_POKEMON_LIST',
    SET_POKEMON_LIST_FILTERED: 'POKEMON_SELECT_LIST/SET_POKEMON_LIST_FILTERED',
    SET_ACTIVE_POKEMON_ID: 'POKEMON_SELECT_LIST/SET_ACTIVE_POKEMON_ID',
    SET_POKEMON_LEAGUE_STATS: 'POKEMON_SELECT_LIST/SET_POKEMON_LEAGUE_STATS',
};
