using BimAI.UI.Shared.Services;
using Microsoft.Extensions.DependencyInjection;

namespace BimAI.UI.Shared.Extensions;

public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddSharedServices(this IServiceCollection services, string apiBaseUrl)
    {
        services.AddHttpClient<ProductService>(client =>
        {
            client.BaseAddress = new Uri(apiBaseUrl);
        });

        services.AddHttpClient<InvoiceService>(client =>
        {
            client.BaseAddress = new Uri(apiBaseUrl);
        });

        return services;
    }
    
}