import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import {
  FormTemplate, FormTemplateSchema,
  FormGenerationLog, FormGenerationLogSchema,
  ClientFolder, ClientFolderSchema,
  Matter, MatterSchema,
  LegalDocument, LegalDocumentSchema,
} from '../common/schemas'
import { FormTemplatesController } from './form-templates.controller'
import { FormTemplatesService } from './form-templates.service'
import { FormLibrarySeeder } from './form-library.seeder'
import { FormCalibrationAgent } from './form-calibration.agent'

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: FormTemplate.name,       schema: FormTemplateSchema },
      { name: FormGenerationLog.name,  schema: FormGenerationLogSchema },
      { name: ClientFolder.name,       schema: ClientFolderSchema },
      { name: Matter.name,             schema: MatterSchema },
      { name: LegalDocument.name,      schema: LegalDocumentSchema },
    ]),
  ],
  controllers: [FormTemplatesController],
  providers: [FormTemplatesService, FormLibrarySeeder, FormCalibrationAgent],
  exports: [FormTemplatesService, FormCalibrationAgent],
})
export class FormTemplatesModule {}
