using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Domain;
using Yi.Framework.AiHub.Domain.AiChat;
using Yi.Framework.AiHub.Domain.AiChat.Impl;
using Yi.Framework.AiHub.Domain.Shared;
using Yi.Framework.Mapster;

namespace Yi.Framework.AiHub.Domain
{
    [DependsOn(
        typeof(YiFrameworkAiHubDomainSharedModule),
        typeof(YiFrameworkMapsterModule),
        typeof(AbpDddDomainModule)
    )]
    public class YiFrameworkAiHubDomainModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            var configuration = context.Services.GetConfiguration();
            var services = context.Services;

            // Configure<AiGateWayOptions>(configuration.GetSection("AiGateWay"));
            //
            services.AddKeyedTransient<IChatService, AzureChatService>(nameof(AzureChatService));
            services.AddKeyedTransient<IChatService, AzureRestChatService>(nameof(AzureRestChatService));
        }

        public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
        {
            var service = context.ServiceProvider;
        }
    }
}