import { Module, Global } from "@nestjs/common";
import { HttpModule } from "@nestjs/axios";
import { ScraperService } from "./scraper.service";
import { AiService } from "./ai.service";
import { DatabaseModule } from "../database/database.module";
import { MatchAnalysisService } from "./match-analysis.service";

@Global()
@Module({
  imports: [
    DatabaseModule,
    HttpModule.register({
      timeout: 35000,
      maxRedirects: 5,
      headers: {
        "User-Agent":
          "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
        "Accept-Language": "tr-TR,tr;q=0.9,en-US;q=0.8",
      },
    }),
  ],
  providers: [ScraperService, MatchAnalysisService, AiService],
  exports: [ScraperService, MatchAnalysisService, AiService],
})
export class ServicesModule {}
