using System;

namespace StellaOps.Configuration;

/// <summary>
/// Represents a configuration diagnostic emitted while analysing Authority plugin settings.
/// </summary>
public sealed record AuthorityConfigurationDiagnostic(
    string PluginName,
    AuthorityConfigurationDiagnosticSeverity Severity,
    string Message)
{
    public string PluginName { get; init; } = PluginName ?? throw new ArgumentNullException(nameof(PluginName));

    public AuthorityConfigurationDiagnosticSeverity Severity { get; init; } = Severity;

    public string Message { get; init; } = Message ?? throw new ArgumentNullException(nameof(Message));
}

/// <summary>
/// Severity levels for configuration diagnostics.
/// </summary>
public enum AuthorityConfigurationDiagnosticSeverity
{
    Info = 0,
    Warning = 1,
    Error = 2
}
