import { Module } from "@nestjs/common";
import { BillingController } from "./billing.controller.js";
import { WhmcsModule } from "@bff/integrations/whmcs/whmcs.module.js";
import { MappingsModule } from "@bff/modules/id-mappings/mappings.module.js";
import { InvoiceRetrievalService } from "./services/invoice-retrieval.service.js";
import { BillingOrchestrator } from "./services/billing-orchestrator.service.js";

/**
 * Billing Module
 *
 * Validation is handled by Zod schemas via Zod DTOs + the global ZodValidationPipe (APP_PIPE).
 */
@Module({
  imports: [WhmcsModule, MappingsModule],
  controllers: [BillingController],
  providers: [InvoiceRetrievalService, BillingOrchestrator],
  exports: [InvoiceRetrievalService, BillingOrchestrator],
})
export class BillingModule {}
