namespace Noctalk_client.Client.Runtime;

public static class Client_tor_policy
{
    private static readonly TimeSpan[] Restart_backoff_delays =
    [
        TimeSpan.FromMinutes(3),
        TimeSpan.FromMinutes(3),
        TimeSpan.FromMinutes(3),
        TimeSpan.FromMinutes(5),
        TimeSpan.FromMinutes(5),
        TimeSpan.FromMinutes(5),
        TimeSpan.FromMinutes(7),
        TimeSpan.FromMinutes(7),
        TimeSpan.FromMinutes(7),
        TimeSpan.FromMinutes(10)
    ];

    public static TimeSpan Restart_delay__get(int The_restart_backoff_index)
    {
        if (The_restart_backoff_index < Restart_backoff_delays.Length)
        {
            return Restart_backoff_delays[Math.Max(0, The_restart_backoff_index)];
        }

        return TimeSpan.FromMinutes(10);
    }
}
