namespace GmRelay.Web;

public sealed class DiscordOAuthOptions
{
    public string ClientId { get; set; } = string.Empty;
    public string ClientSecret { get; set; } = string.Empty;
    public string RedirectUri { get; set; } = string.Empty;
    public string[] Scopes { get; set; } = ["identify", "guilds"];

    public void Validate()
    {
        if (string.IsNullOrWhiteSpace(ClientId))
            throw new InvalidOperationException("Discord:ClientId is required.");
        if (string.IsNullOrWhiteSpace(ClientSecret))
            throw new InvalidOperationException("Discord:ClientSecret is required.");
        if (string.IsNullOrWhiteSpace(RedirectUri))
            throw new InvalidOperationException("Discord:RedirectUri is required.");
    }
}
