import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import configurations from './configs/configurations';
import { AuthModule } from './modules/auth/auth.module';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AdminModule } from './admin/admin.module';
import { PrismaModule } from '../prisma/prisma.module'; // ✅
import { PatientsModule } from './modules/patients/patients.module';
import { StaffModule } from './modules/staff/staff.module';
import { OrganizationModule } from './modules/organization/organization.module';
import { AppointmentsModule } from './modules/appointments/appointments.module';
import { TreatmentsModule } from './modules/treatments/treatments.module';
import { CasesModule } from './modules/cases/cases.module';
import { TasksModule } from './modules/tasks/tasks.module';
import { TreatmentCatalogModule } from './modules/treatment-catalog/treatment-catalog.module';
import { CatalogModule } from './modules/catalog/catalog.module';
import { ProsthesisCatalogModule } from './modules/prosthesis-catalog/prosthesis-catalog.module';
import { LabCaseCommentsModule } from './modules/lab-case-comments/lab-case-comments.module';
import { TodayModule } from './modules/today/today.module';
import { NotificationsModule } from './modules/notifications/notifications.module';
import { RealtimeModule } from './realtime/realtime.module';

@Module({
  imports: [
    ConfigModule.forRoot({
      isGlobal: true,
      load: [configurations],
    }),
    PrismaModule, // ✅ ADD THIS
    CatalogModule,
    TreatmentCatalogModule,
    ProsthesisCatalogModule,
    AuthModule,
    PatientsModule,
    AppointmentsModule,
    TreatmentsModule,
    CasesModule,
    TasksModule,
    LabCaseCommentsModule,
    StaffModule,
    OrganizationModule,
    TodayModule,
    NotificationsModule,
    RealtimeModule,
    AdminModule.forRoot(),
  ],
  controllers: [AppController],
  providers: [AppService], 
})
export class AppModule {}