/**
 * Service Container Setup for Data Pipeline
 * Configures dependency injection for the data pipeline service
 */

import type { AppConfig } from '@stock-bot/config';
import type { IServiceContainer } from '@stock-bot/handlers';
import { getLogger } from '@stock-bot/logger';

const logger = getLogger('data-pipeline-container');

/**
 * Configure the service container for data pipeline workloads
 */
export function setupServiceContainer(
  config: AppConfig,
  container: IServiceContainer
): IServiceContainer {
  logger.info('Configuring data pipeline service container...');

  // Data pipeline specific configuration
  // This service does more complex queries and transformations
  const poolSizes = {
    mongodb: config.environment === 'production' ? 40 : 20,
    postgres: config.environment === 'production' ? 50 : 25,
    cache: config.environment === 'production' ? 30 : 15,
  };

  logger.info('Data pipeline pool sizes configured', poolSizes);

  // The container is already configured with connections
  // Just return it with our logging
  return container;
}
