import { Module, Global } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { ClaudeAgentService } from './claude-agent.service';
import { ClaudeAgentServiceV2 } from './claude-agent-v2.service';
import { ImmigrationToolsService } from './tools/immigration-tools.service';
import { TokenUsageService } from './token-usage.service';
import { StrategyEngineService } from './strategy/strategy-engine.service';
import { TokenUsageEntity } from '../../domain/entities/token-usage.entity';
import { KnowledgeModule } from '../knowledge/knowledge.module';

@Global()
@Module({
  imports: [
    ConfigModule,
    KnowledgeModule,
    TypeOrmModule.forFeature([TokenUsageEntity]),
  ],
  providers: [
    ClaudeAgentService,
    ClaudeAgentServiceV2,
    ImmigrationToolsService,
    TokenUsageService,
    StrategyEngineService,
  ],
  exports: [
    ClaudeAgentService,
    ClaudeAgentServiceV2,
    ImmigrationToolsService,
    TokenUsageService,
    StrategyEngineService,
  ],
})
export class ClaudeModule {}
