import { Module, forwardRef } from "@nestjs/common";
import { ServicesController } from "./services.controller.js";
import { ServicesHealthController } from "./services-health.controller.js";
import { InternetEligibilityController } from "./internet-eligibility.controller.js";
import { PublicServicesController } from "./public-services.controller.js";
import { AccountServicesController } from "./account-services.controller.js";
import { IntegrationsModule } from "@bff/integrations/integrations.module.js";
import { MappingsModule } from "@bff/modules/id-mappings/mappings.module.js";
import { CoreConfigModule } from "@bff/core/config/config.module.js";
import { CacheModule } from "@bff/infra/cache/cache.module.js";
import { QueueModule } from "@bff/infra/queue/queue.module.js";
import { WorkflowModule } from "@bff/modules/shared/workflow/index.js";

import { BaseServicesService } from "./application/base-services.service.js";
import { InternetServicesService } from "./application/internet-services.service.js";
import { InternetEligibilityService } from "./application/internet-eligibility.service.js";
import { SimServicesService } from "./application/sim-services.service.js";
import { VpnServicesService } from "./application/vpn-services.service.js";
import { ServicesCacheService } from "./application/services-cache.service.js";

@Module({
  imports: [
    forwardRef(() => IntegrationsModule),
    MappingsModule,
    CoreConfigModule,
    CacheModule,
    QueueModule,
    WorkflowModule,
  ],
  controllers: [
    ServicesController,
    PublicServicesController,
    AccountServicesController,
    ServicesHealthController,
    InternetEligibilityController,
  ],
  providers: [
    BaseServicesService,
    InternetServicesService,
    InternetEligibilityService,
    SimServicesService,
    VpnServicesService,
    ServicesCacheService,
  ],
  exports: [
    InternetServicesService,
    InternetEligibilityService,
    SimServicesService,
    VpnServicesService,
    ServicesCacheService,
  ],
})
export class ServicesModule {}
