using Microsoft.Extensions.DependencyInjection;

namespace ScadaLink.DeploymentManager;

public static class ServiceCollectionExtensions
{
    public static IServiceCollection AddDeploymentManager(this IServiceCollection services)
    {
        services.AddSingleton<OperationLockManager>();
        services.AddScoped<IFlatteningPipeline, FlatteningPipeline>();
        services.AddScoped<DeploymentService>();
        services.AddScoped<ArtifactDeploymentService>();
        return services;
    }

    public static IServiceCollection AddDeploymentManagerActors(this IServiceCollection services)
    {
        // Akka actor registration is handled by Host component during actor system startup
        return services;
    }
}
