import { Module } from '@nestjs/common';
import { HttpModule } from '@nestjs/axios';
import { TypeOrmModule } from '@nestjs/typeorm';
import { MetaAdsService } from './services/meta-ads.service';
import { MetaAdsController } from './controllers/meta-ads.controller';
import { User } from '../users/entities/user.entity';
import { ConnectedAccount } from './entities/connected-account.entity';
import { UsersModule } from '../users/users.module';
import { Workspace } from '../users/entities/workspace.entity';
import { MetaCampaign } from './entities/meta-campaign.entity';
import { AIAnalysis } from '../analytics/entities/ai-analysis.entity';

/**
 * Meta Ads Module
 * وحدة إعلانات ميتا
 * 
 * Why: Encapsulates all logic related to Meta Ads Marketing API.
 * لماذا: تغلف كل المنطق المتعلق بواجهة برمجة تطبيقات ميتـا للتسويق.
 */
@Module({
  imports: [
    HttpModule,
    UsersModule,
    TypeOrmModule.forFeature([User, ConnectedAccount, Workspace, MetaCampaign, AIAnalysis]),
  ],
  providers: [MetaAdsService],
  controllers: [MetaAdsController],
  exports: [MetaAdsService],
})
export class MetaAdsModule {}
