namespace StockFin.ViewModels
{
    public class HomeDashboardViewModel
    {
        public IReadOnlyList<HomeAccountTypeSummaryViewModel> TypeSummaries { get; init; } = [];

        public double TotalActualValue { get; init; }

        public double TotalStartValue { get; init; }

        public int AccountCount { get; init; }

        public int ActiveTypeCount => TypeSummaries.Count;
    }

    public class HomeAccountTypeSummaryViewModel
    {
        public long TypeId { get; init; }

        public string TypeTitle { get; init; } = string.Empty;

        public string Color { get; init; } = string.Empty;

        public double ActualValue { get; init; }

        public double StartValue { get; init; }

        public double Percentage { get; init; }

        public double StartPercentage { get; init; }

        public IReadOnlyList<AccountState> Accounts { get; init; } = [];
    }
}
