namespace PowderCoating.Web.ViewModels.Platform;

public class OnboardingProgressIndexViewModel
{
    public List<OnboardingProgressRowViewModel> Rows { get; set; } = new();
    public int TotalCompanies => Rows.Count;
    public int WizardCompleted => Rows.Count(r => r.WizardCompleted);
    public int FullyActivated => Rows.Count(r => r.Status == OnboardingStatus.Complete);
    public int InProgress => Rows.Count(r => r.Status == OnboardingStatus.InProgress);
    public int NotStarted => Rows.Count(r => r.Status == OnboardingStatus.NotStarted);
}

public class OnboardingProgressRowViewModel
{
    public int CompanyId { get; set; }
    public string CompanyName { get; set; } = string.Empty;
    public bool WizardCompleted { get; set; }
    public string? OnboardingPath { get; set; }
    public int StepsCompleted { get; set; }
    public int TotalSteps { get; set; }
    public DateTime? FirstJobCreatedAt { get; set; }
    public DateTime? FirstQuoteCreatedAt { get; set; }
    public DateTime? FirstInvoiceCreatedAt { get; set; }
    public DateTime? FirstWorkflowCompletedAt { get; set; }
    public DateTime? GuidedActivationDismissedAt { get; set; }
    public OnboardingStatus Status { get; set; }
}

public enum OnboardingStatus
{
    NotStarted,
    InProgress,
    Complete,
    Dismissed
}
