import { Module } from "@nestjs/common";
import { ConfigModule } from "@nestjs/config";
import { QueueModule } from "@bff/core/queue/queue.module";
import { SalesforceService } from "./salesforce.service";
import { SalesforceConnection } from "./services/salesforce-connection.service";
import { SalesforceAccountService } from "./services/salesforce-account.service";
import { SalesforceOrderService } from "./services/salesforce-order.service";
import { OrderFieldConfigModule } from "@bff/modules/orders/config/order-field-config.module";
import { SalesforceReadThrottleGuard } from "./guards/salesforce-read-throttle.guard";
import { SalesforceWriteThrottleGuard } from "./guards/salesforce-write-throttle.guard";

@Module({
  imports: [QueueModule, ConfigModule, OrderFieldConfigModule],
  providers: [
    SalesforceConnection,
    SalesforceAccountService,
    SalesforceOrderService,
    SalesforceService,
    SalesforceReadThrottleGuard,
    SalesforceWriteThrottleGuard,
  ],
  exports: [
    QueueModule,
    SalesforceService,
    SalesforceConnection,
    SalesforceOrderService,
    SalesforceReadThrottleGuard,
    SalesforceWriteThrottleGuard,
  ],
})
export class SalesforceModule {}
