import { registerAs } from '@nestjs/config';

export default registerAs('storage', () => ({
  endpoint: process.env.MINIO_ENDPOINT || 'localhost',
  port: parseInt(process.env.MINIO_PORT || '9000', 10),
  accessKey: process.env.MINIO_ACCESS_KEY || 'minioadmin',
  secretKey: process.env.MINIO_SECRET_KEY || 'minioadmin',
  bucket: process.env.MINIO_BUCKET_DOCUMENTS || 'goa-gel-documents',
  useSSL: process.env.MINIO_USE_SSL === 'true',
  region: process.env.MINIO_REGION || 'us-east-1',
  signedUrlExpiry: parseInt(process.env.MINIO_SIGNED_URL_EXPIRY || '3600', 10),
}));
