using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SatelliteProvider.Common.Interfaces;

namespace SatelliteProvider.Services.RouteManagement;

public static class RouteManagementServiceCollectionExtensions
{
    public static IServiceCollection AddRouteManagement(this IServiceCollection services)
    {
        services.AddSingleton<RouteCsvWriter>();
        services.AddSingleton<RouteSummaryWriter>();
        services.AddSingleton<RouteImageRenderer>();
        services.AddSingleton<TilesZipBuilder>();
        services.AddSingleton<RegionFileCleaner>();
        services.AddSingleton<IRouteService, RouteService>();
        services.AddHostedService<RouteProcessingService>();
        return services;
    }
}
