import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Rule } from './entities/rule.entity';
import { User } from '../users/entities/user.entity';
import { AutomationService } from './services/automation.service';
import { UsersModule } from '../users/users.module';
import { RuleEngineService } from './services/rule-engine.service';
import { AutomationController } from './controllers/automation.controller';
import { AnalyticsModule } from '../analytics/analytics.module';
import { MetaAdsModule } from '../meta-ads/meta-ads.module';

@Module({
  imports: [
    TypeOrmModule.forFeature([Rule, User]),
    AnalyticsModule,
    MetaAdsModule,
    UsersModule,
  ],
  providers: [RuleEngineService, AutomationService],
  controllers: [AutomationController],
  exports: [RuleEngineService, AutomationService],
})
export class AutomationModule {}
