public static class AuthHelper
{
    public static void AsNurse(this HttpClient client, Guid? userId = null)
    {
        client.DefaultRequestHeaders.Remove("X-Test-Role");
        client.DefaultRequestHeaders.Add("X-Test-Role", "NURSE");
        if (userId.HasValue)
        {
            client.DefaultRequestHeaders.Remove("X-Test-User-Id");
            client.DefaultRequestHeaders.Add("X-Test-User-Id", userId.ToString()!);
        }
    }

    public static void AsAdmin(this HttpClient client)
    {
        client.DefaultRequestHeaders.Remove("X-Test-Role");
        client.DefaultRequestHeaders.Add("X-Test-Role", "ADMIN");
    }

    public static void AsPhysician(this HttpClient client)
    {
        client.DefaultRequestHeaders.Remove("X-Test-Role");
        client.DefaultRequestHeaders.Add("X-Test-Role", "PHYSICIAN");
    }

    public static void AsIntegration(this HttpClient client)
    {
        client.DefaultRequestHeaders.Remove("X-Test-Role");
        client.DefaultRequestHeaders.Add("X-Test-Role", "INTEGRATION");
    }

    public static void ClearAuth(this HttpClient client)
    {
        client.DefaultRequestHeaders.Remove("X-Test-Role");
        client.DefaultRequestHeaders.Remove("X-Test-User-Id");
    }
}
