import { Module } from "@nestjs/common";
import { NotificationLogModule } from "./notification-log.module";
import { NotificationScheduleModule } from "./notification-schedule.module";
import { SettingsModule } from "../settings/settings.module";
import { NotificationsController } from "./notifications.controller";
import { NotificationsService } from "./notifications.service";

/**
 * Mass email notifications. MailModule is global (registered in AppModule),
 * so this module needs no MailService import — it picks it up by injection.
 *
 * The automatic sweep is registered by `NotificationsService` against
 * `NotificationScheduleService`, which owns the cadence for both halves of
 * /notificaciones and stores it in `app_settings`.
 */
@Module({
  imports: [NotificationLogModule, NotificationScheduleModule, SettingsModule],
  controllers: [NotificationsController],
  providers: [NotificationsService],
  exports: [NotificationsService],
})
export class NotificationsModule {}
