import { Module, forwardRef } from '@nestjs/common';
import { PaymentFactory } from './payment.factory';
import { PaymentsWebhookController } from './payments-webhook.controller';
import { CheckoutController } from './checkout.controller';
import { PaymentPollingService } from './payment-polling.service';
import { CommerceModule } from '../commerce/commerce.module';
import { BusinessModule } from '../business/business.module';

@Module({
  imports: [forwardRef(() => CommerceModule), BusinessModule],
  controllers: [PaymentsWebhookController, CheckoutController],
  providers: [PaymentFactory, PaymentPollingService],
  exports: [PaymentFactory, PaymentPollingService],
})
export class PaymentModule {}
