import { forwardRef, Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AdminsModule } from '../admins/admins.module';
import { NotificationModule } from '../notification/notification.module';
import { BotTelegramApi } from './apis/bot-telegram.api';
import { AuctionHistoresApi } from './apis/auction-histories.api';
import { AdminBidHistoriesController } from './controllers/admin/admin-bid-histories.controller';
import { AdminBidsController } from './controllers/admin/admin-bids.controller';
import { AdminOutBidLogsController } from './controllers/admin/admin-out-bid-logs.controller';
import { AdminSendMessageHistoriesController } from './controllers/admin/admin-send-message-histories.controller';
import { AdminWebBidsController } from './controllers/admin/admin-web-bids.controller';
import { BidHistoriesController } from './controllers/client/bid-histories.controller';
import { BidsController } from './controllers/client/bids.controller';
import { OutBidLogsController } from './controllers/client/out-bid-logs.controller';
import { BidHistory } from './entities/bid-history.entity';
import { Bid } from './entities/bid.entity';
import { OutBidLog } from './entities/out-bid-log.entity';
import { SendMessageHistory } from './entities/send-message-histories.entity';
import { WebBid } from './entities/wed-bid.entity';
import { AdminBidGateway } from './getways/admin-bid-getway';
import { BidGateway } from './getways/bid-getway';
import { BidHistoriesService } from './services/bid-histories.service';
import { BidsService } from './services/bids.service';
import { ImapService } from './services/mail/imap.service';
import { OutBidLogsService } from './services/out-bid-logs.service';
import { SendMessageHistoriesService } from './services/send-message-histories.service';
import { WebBidsService } from './services/web-bids.service';
import { DashboardService } from './services/dashboard.service';
import { AdminDashboardController } from './controllers/admin/admin-dashboard.controller';
import { TasksService } from './services/tasks.servise';
import { ConfigsService } from './services/configs.service';
import { Config } from './entities/configs.entity';
import { AdminConfigsController } from './controllers/admin/admin-configs.controller';
import { BidMetadatasService } from './services/bid-metadatas.service';
import { BidMetadata } from './entities/bid-metadata.entity';
import { HotItemApi } from './apis/hot-item.api';
import { MailsModule } from '../mails/mails.module';
import { AdminBidMetadataController } from './controllers/admin/admin-bid-metadata.controller';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Bid,
      BidHistory,
      OutBidLog,
      WebBid,
      SendMessageHistory,
      Config,
      BidMetadata,
    ]),
    // AuthModule,
    AdminsModule,
    NotificationModule,
  ],
  controllers: [
    BidsController,
    BidHistoriesController,
    OutBidLogsController,
    AdminBidHistoriesController,
    AdminBidsController,
    AdminOutBidLogsController,
    AdminWebBidsController,
    AdminSendMessageHistoriesController,
    AdminDashboardController,
    AdminConfigsController,
    AdminBidMetadataController,
  ],
  providers: [
    BidsService,
    BidHistoriesService,
    BidGateway,
    AdminBidGateway,
    OutBidLogsService,
    WebBidsService,
    BotTelegramApi,
    AuctionHistoresApi,
    SendMessageHistoriesService,
    ImapService,
    DashboardService,
    TasksService,
    ConfigsService,
    BidMetadatasService,
    HotItemApi,
  ],
  exports: [
    BotTelegramApi,
    SendMessageHistoriesService,
    BidMetadatasService,
    BidsService,
    ConfigsService,
    DashboardService,
    HotItemApi,
  ],
})
export class BidsModule {}
