/**
 * Storage Module
 *
 * Provides file storage functionality (S3/MinIO)
 */

import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { S3StorageAdapter } from './s3-storage.adapter';
import { STORAGE_PORT } from '@domain/ports/out/storage.port';

@Module({
  imports: [ConfigModule],
  providers: [
    S3StorageAdapter, // Add direct provider for dependency injection
    {
      provide: STORAGE_PORT,
      useClass: S3StorageAdapter,
    },
  ],
  exports: [STORAGE_PORT, S3StorageAdapter], // Export both token and class
})
export class StorageModule {}
