using Microsoft.Extensions.DependencyInjection;
using NetworkResurrector.Agent.Wrapper.Models;
using NetworkResurrector.Agent.Wrapper.Services;
using NetworkResurrector.Agent.Wrapper.Services.Internal;

namespace NetworkResurrector.Agent.Wrapper
{
    public static class DependencyInjectionExtension
    {
        public static void UseResurrectorAgentServices(this IServiceCollection services, bool forwardHeaders = true)
        {
            services.AddSingleton(new ServiceConfiguration(forwardHeaders));
            services.AddScoped<HttpHeadersService>();
            services.AddHttpClient<IResurrectorAgentService, ResurrectorAgentService>();
        }
    }
}
