namespace TaxBaik.Infrastructure;

using Microsoft.Extensions.DependencyInjection;
using TaxBaik.Domain.Interfaces;
using TaxBaik.Infrastructure.Data;
using TaxBaik.Infrastructure.Repositories;

public static class DependencyInjection
{
    public static IServiceCollection AddInfrastructure(this IServiceCollection services)
    {
        services.AddSingleton<IDbConnectionFactory, DbConnectionFactory>();
        services.AddScoped<IAdminUserRepository, AdminUserRepository>();
        services.AddScoped<ICategoryRepository, CategoryRepository>();
        services.AddScoped<IBlogPostRepository, BlogPostRepository>();
        services.AddScoped<IInquiryRepository, InquiryRepository>();
        services.AddScoped<ISiteSettingRepository, SiteSettingRepository>();
        services.AddScoped<IAnnouncementRepository, AnnouncementRepository>();
        services.AddScoped<IClientRepository, ClientRepository>();
        services.AddScoped<IFaqRepository, FaqRepository>();
        services.AddScoped<IConsultationRepository, ConsultationRepository>();
        services.AddScoped<IPortalUserRepository, PortalUserRepository>();
        services.AddScoped<ITaxFilingRepository, TaxFilingRepository>();
        services.AddScoped<ICompanyRepository, CompanyRepository>();
        services.AddScoped<ITaxProfileRepository, TaxProfileRepository>();
        services.AddScoped<ITaxFilingScheduleRepository, TaxFilingScheduleRepository>();
        services.AddScoped<IConsultingActivityRepository, ConsultingActivityRepository>();
        services.AddScoped<IContractRepository, ContractRepository>();
        services.AddScoped<IRevenueTrackingRepository, RevenueTrackingRepository>();
        services.AddScoped<ICommonCodeRepository, CommonCodeRepository>();

        return services;
    }
}
