using System.Net.Http.Json;
using TIAMWebApp.Shared.Application.Interfaces;
using TIAMWebApp.Shared.Application.Models;

namespace TIAMMobileApp.Services
{
    public class PopulationStructureDataProvider : IPopulationStructureDataProvider
    {
        private readonly HttpClient http;

        public PopulationStructureDataProvider(HttpClient http)
        {
            this.http = http;
        }

        public Task<PopulationAgeStructureItem[]?> QueryData()
        {
            return http.GetFromJsonAsync<PopulationAgeStructureItem[]>("PopulationStructureAPI");
        }

        
    }
}
