using System.Text.Json.Serialization;

namespace ClaudeDo.Worker.Online;

public sealed class ZitadelClientConfig
{
    [JsonPropertyName("authority")]
    public string Authority { get; set; } = "";

    [JsonPropertyName("client_id")]
    public string ClientId { get; set; } = "";

    [JsonPropertyName("scopes")]
    public string Scopes { get; set; } = "openid offline_access";
}

public sealed class OnlineInboxConfig
{
    [JsonPropertyName("enabled")]
    public bool Enabled { get; set; } = false;

    [JsonPropertyName("api_base_url")]
    public string ApiBaseUrl { get; set; } = "";

    [JsonPropertyName("poll_interval_seconds")]
    public int PollIntervalSeconds { get; set; } = 60;

    [JsonPropertyName("redirect_uri")]
    public string RedirectUri { get; set; } = "http://localhost:8765/callback";

    [JsonPropertyName("zitadel")]
    public ZitadelClientConfig Zitadel { get; set; } = new();
}
