import { Module } from '@nestjs/common';

// Services
import { TelegramApiService } from './services/telegram-api.service';
import { BotManagerService } from './services/bot-manager.service';
import { SubscriberService } from './services/subscriber.service';
import { ScenarioService } from './services/scenario.service';
import { ScenarioEngineService } from './services/scenario-engine.service';
import { ReferralService } from './services/referral.service';
import { BroadcastService } from './services/broadcast.service';
import { BotWebhookService } from './services/bot-webhook.service';
import { CrmIntegrationService } from './services/crm-integration.service';
import { AnalyticsService } from './services/analytics.service';
import { TelegramPollingService } from './services/polling.service';

// Processors
import { TelegramIncomingProcessor } from './processors/telegram-incoming.processor';
import { DelayNodeProcessor } from './processors/delay-node.processor';
import { BotWebhookProcessor } from './processors/bot-webhook.processor';
import { BroadcastProcessor } from './processors/broadcast.processor';

// Controllers
import { BotController } from './controllers/bot.controller';
import { SubscriberController } from './controllers/subscriber.controller';
import { ScenarioController } from './controllers/scenario.controller';
import { BroadcastController } from './controllers/broadcast.controller';
import { BotWebhookController } from './controllers/bot-webhook.controller';
import { AnalyticsController } from './controllers/analytics.controller';
import { WebhookInputController } from './controllers/webhook-input.controller';

@Module({
  controllers: [
    BotController,
    SubscriberController,
    ScenarioController,
    BroadcastController,
    BotWebhookController,
    AnalyticsController,
    WebhookInputController,
  ],
  providers: [
    // Services
    TelegramApiService,
    BotManagerService,
    SubscriberService,
    ScenarioService,
    ScenarioEngineService,
    ReferralService,
    BroadcastService,
    BotWebhookService,
    CrmIntegrationService,
    AnalyticsService,
    TelegramPollingService,
    // Processors
    TelegramIncomingProcessor,
    DelayNodeProcessor,
    BotWebhookProcessor,
    BroadcastProcessor,
  ],
  exports: [
    TelegramApiService,
    BotManagerService,
    SubscriberService,
    ScenarioService,
    ScenarioEngineService,
    ReferralService,
    BroadcastService,
    BotWebhookService,
    CrmIntegrationService,
    AnalyticsService,
  ],
})
export class TelegramBotModule {}
