using System.Text.Json;

namespace YMhut.Box.Core.Startup;

public sealed record StartupSplashMessage(
    string Type,
    string Status,
    double Progress = 0,
    string StageId = "",
    string StageName = "",
    int StepIndex = 0,
    int StepCount = 0,
    string? Detail = null,
    string Severity = "info",
    bool IsRepairStep = false,
    bool IsIndeterminate = false,
    bool HasIssues = false,
    int VisibleIssueCount = 0,
    long DurationMs = 0,
    string? Theme = null,
    bool ReducedMotion = false)
{
    public string ToJson()
        => JsonSerializer.Serialize(this, StartupCheckJson.Options);
}
