import { Module } from '@nestjs/common';
import { AdaptersModule } from '../adapters/adapters.module';
import { TemplateRepository } from './template.repository';
import { TemplateService } from './template.service';
import { TemplatedSender } from './templated-sender';
import { TemplateSeeder } from './template.seeder';
import { TemplateController } from './template.controller';

/**
 * Reusable message-template module: render a stored/inline template → hand it to the existing
 * outbound pipeline (via AdaptersModule's OutboundService). Content lives here; delivery stays in
 * the outbound/capability layers. SessionVerifier, ActorResolver (IdentityModule) and PLATFORM_PORTS
 * (PlatformModule) are global.
 */
@Module({
  imports: [AdaptersModule],
  controllers: [TemplateController],
  providers: [TemplateRepository, TemplateService, TemplatedSender, TemplateSeeder],
  exports: [TemplateService, TemplatedSender],
})
export class TemplateModule {}
