//using JSMR.Application.Integrations.Ports;
//using JSMR.Infrastructure.Integrations.DLSite.Serialization;
//using Microsoft.Extensions.DependencyInjection;

//namespace JSMR.Infrastructure.Integrations.DLSite;

public static class DLSiteClientRegistration
{
    //public static IServiceCollection AddDLSiteClient(this IServiceCollection services, Uri baseAddress)
    //{
    //    // Build per-client JSON options with the DLSite-specific converters
    //    var json = DLSiteJsonContext.CreateOptions();

    //    services.AddHttpClient<IDLSiteClient, DLSiteClient>(client =>
    //    {
    //        client.BaseAddress = baseAddress; // e.g., new Uri("https://www.dlsite.com/")
    //        client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
    //        client.Timeout = TimeSpan.FromSeconds(20);
    //    })
    //    .AddPolicyHandler(ResiliencePolicies.DefaultRetry()); // optional Polly

    //    // Provide the options to the client via DI
    //    services.AddSingleton(json);

    //    return services;
    //}
}