using Microsoft.AspNetCore.Mvc;
using System.Reflection.Metadata;
using TIAMWebApp.Shared.Application.Models;

namespace TIAMWebApp.Server.Controllers
{
    [ApiController]
    [Route("api/v1/[controller]")]
    public class PopulationStructureAPIController : ControllerBase
    {
        private static readonly PopulationAgeStructureItem[] PopulationData = new PopulationAgeStructureItem[]
        {
           
            new PopulationAgeStructureItem("0-14 years", "Male", "Andorra", 111200 ),
            new PopulationAgeStructureItem("0-14 years", "Female", "Andorra", 116600 ),
            new PopulationAgeStructureItem("15-64 years", "Male", "Andorra", 92500 ),
            new PopulationAgeStructureItem("15-64 years", "Female", "Andorra", 87200 ),
            new PopulationAgeStructureItem("65 years and older", "Male", "Andorra", 451200 ),
            new PopulationAgeStructureItem("65 years and older", "Female", "Andorra", 540200 ),            
            new PopulationAgeStructureItem("0-14 years", "Male", "Angola", 356500 ),
            new PopulationAgeStructureItem("0-14 years", "Female", "Angola", 395200 ),
            new PopulationAgeStructureItem("15-64 years", "Male", "Angola", 302000 ),
            new PopulationAgeStructureItem("15-64 years", "Female", "Angola", 333400 ),
            new PopulationAgeStructureItem("65 years and older", "Male", "Angola", 1357200 ),
            new PopulationAgeStructureItem("65 years and older", "Female", "Angola", 1892700 ),
            
        };

        private readonly ILogger<TransferDataAPIController> _logger;

        public PopulationStructureAPIController(ILogger<TransferDataAPIController> logger)
        {
            _logger = logger;
        }

        [HttpGet]
        public IEnumerable<PopulationAgeStructureItem> GetPopulationData()
        {
            return PopulationData;
        }
    }
}