import { Module } from "@nestjs/common";
import { FreebitMapperService } from "./services/freebit-mapper.service.js";
import { FreebitFacade } from "./facades/freebit.facade.js";
import { FreebitClientService } from "./services/freebit-client.service.js";
import { FreebitAuthService } from "./services/freebit-auth.service.js";
import { FreebitRateLimiterService } from "./services/freebit-rate-limiter.service.js";
import { FreebitAccountService } from "./services/freebit-account.service.js";
import { FreebitUsageService } from "./services/freebit-usage.service.js";
import { FreebitPlanService } from "./services/freebit-plan.service.js";
import { FreebitVoiceService } from "./services/freebit-voice.service.js";
import { FreebitCancellationService } from "./services/freebit-cancellation.service.js";
import { FreebitEsimService } from "./services/freebit-esim.service.js";
import { FreebitErrorHandlerService } from "./services/freebit-error-handler.service.js";
import { FreebitTestTrackerService } from "./services/freebit-test-tracker.service.js";
import { FreebitAccountRegistrationService } from "./services/freebit-account-registration.service.js";
import { FreebitVoiceOptionsService } from "./services/freebit-voice-options.service.js";
import { FreebitSemiBlackService } from "./services/freebit-semiblack.service.js";

@Module({
  imports: [],
  providers: [
    // Core services
    FreebitErrorHandlerService,
    FreebitClientService,
    FreebitAuthService,
    FreebitMapperService,
    FreebitRateLimiterService,
    FreebitTestTrackerService,
    // Specialized operation services
    FreebitAccountService,
    FreebitUsageService,
    FreebitPlanService,
    FreebitVoiceService,
    FreebitCancellationService,
    FreebitEsimService,
    // Physical SIM activation services (PA05-18 + PA02-01 + PA05-05)
    FreebitSemiBlackService,
    FreebitAccountRegistrationService,
    FreebitVoiceOptionsService,
    // Facade (delegates to specialized services, handles account normalization)
    FreebitFacade,
  ],
  exports: [
    // Export error handler
    FreebitErrorHandlerService,
    // Export main facade for all Freebit operations
    FreebitFacade,
    // Export specialized services for direct access if needed
    FreebitAccountService,
    FreebitUsageService,
    FreebitPlanService,
    FreebitVoiceService,
    FreebitCancellationService,
    FreebitEsimService,
    // Physical SIM activation services (PA05-18 + PA02-01 + PA05-05)
    FreebitSemiBlackService,
    FreebitAccountRegistrationService,
    FreebitVoiceOptionsService,
    // Rate limiter (needed by SimController)
    FreebitRateLimiterService,
  ],
})
export class FreebitModule {}
