import { Module, forwardRef } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { PrismaModule } from '../../infrastructure/database/prisma.module';
import { AiJobModule } from '../ai-job/ai-job.module';
import { MembershipModule } from '../membership/membership.module';
import { UserAiController } from './user-ai.controller';
import { UserAiService } from './user-ai.service';
import { CredentialEncryptionService } from './credential-encryption.service';
import { RuntimeInternalController } from './internal/runtime-internal.controller';
import { RuntimeInternalService } from './internal/runtime-internal.service';
import { UserAiQuotaService } from './user-ai-quota.service';
import { PlatformBudgetService } from './platform-budget.service';
import { SnapshotBuilderService } from './snapshot-builder.service';
import { PriorityRulesService } from './priority-rules.service';
import { SnapshotCleanupService } from './snapshot-cleanup.service';
import { JobReaperService } from './job-reaper.service';
import { QuizExecutionRouter } from './quiz-execution-router';
import { LearningAnalysisExecutionRouter } from './learning-analysis-execution-router';

@Module({
  imports: [ConfigModule, PrismaModule, forwardRef(() => AiJobModule), MembershipModule],
  controllers: [UserAiController, RuntimeInternalController],
  providers: [UserAiService, CredentialEncryptionService, RuntimeInternalService, UserAiQuotaService, PlatformBudgetService, SnapshotBuilderService, PriorityRulesService, SnapshotCleanupService, JobReaperService, QuizExecutionRouter, LearningAnalysisExecutionRouter],
  exports: [UserAiService, CredentialEncryptionService, RuntimeInternalService, UserAiQuotaService, PlatformBudgetService, SnapshotBuilderService, PriorityRulesService, SnapshotCleanupService, JobReaperService],
})
export class AiRuntimeModule {}
