using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TIAMWebApp.Shared.Application.Interfaces;
using TIAMWebApp.Shared.Application.Models;

namespace TIAMSharedUI.Pages.User.SysAdmins
{
    public partial class SysAdminComponent : ComponentBase
    {
        [Inject]
        IPopulationStructureDataProvider DataProvider { get; set; }

        object? AffiliateData { get; set; }

        IEnumerable<PopulationAgeStructureItem>? ChartsData;


        protected override async Task OnInitializedAsync()
        {
            base.OnInitialized();



            AffiliateData = new object[]
            {
           new {
                AffiliateId = 1,
                IncomeThisMonth = "$5",
                IncomeAlltime = "9425",
                CompanyName = "Upgen Ltd.",
                Status = "Active"
            },
            new {
                AffiliateId = 2,
                IncomeThisMonth = "$538",
                IncomeAlltime = "13425",
                CompanyName = "Kovacs hotel Ltd.",
                Status = "Active"
            },
            new {
                AffiliateId = 3,
                IncomeThisMonth = "$0",
                IncomeAlltime = "134200",
                CompanyName = "Innosaurus Ltd.",
                Status = "Passive"
            },
            };


            ChartsData = await DataProvider.QueryData();


        }
        [Parameter] public bool ShowSeriesPointMarkers { get; set; }
        [Parameter] public bool ShowSeriesLabels { get; set; }

    }
}
