using Portfolio.Domain.Features.Articles;
using Portfolio.Domain.Features.Pokemon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace Portfolio.Application.Services.PokemonService
{
    public class PokemonService : IPokemonService
    {
        private readonly IPokemonRepository _pokemonRepository;

        public PokemonService(IPokemonRepository pokemonRepository)
        {
            _pokemonRepository = pokemonRepository;
        }

        public async Task AddPokemonAsync(Pokemon pokemon)
        {
            await _pokemonRepository.AddPokemonAsync(pokemon);
        }
        public async Task DeletePokemonAsync(int pokemonId)
        {
            await _pokemonRepository.DeletePokemonAsync(pokemonId);
        }

        public async Task<List<Pokemon>> GetAllPokemonAsync()
        {
            return await _pokemonRepository.GetAllPokemonsAsync();

        }

        public async Task<List<int>> GetAllPokemonIdsAsync()
        {
            return await _pokemonRepository.GetAllPokemonIdsAsync();
        }

        public async Task<int?> GetNextPokemonIdAsync(int id)
        {
            return await _pokemonRepository.GetNextPokemonIdAsync(id);
        }

        public async Task<Pokemon> GetPokemonByPokemonIdAsync(int id)
        {
            return await _pokemonRepository.GetPokemonByPokemonIdAsync(id);
        }

        public async Task<Pokemon> GetPokemonByIdAsync(int id)
        {
            return await _pokemonRepository.GetPokemonByIdAsync(id);
        }

        public async Task<int?> GetPreviousPokemonIdAsync(int id)
        {
            return await _pokemonRepository.GetPreviousPokemonIdAsync(id);

        }

        public async Task UpdatePokemonAsync(Pokemon pokemon)
        {
            await _pokemonRepository.UpdatePokemonAsync(pokemon);
        }

        public async Task<int?> GetVariationPokemonIdAsync(int id)
        {
            return await _pokemonRepository.GetVariationPokemonIdAsync(id);
        }
    }
}
