import { asValue, type AwilixContainer } from 'awilix';
import { getLogger } from '@stock-bot/logger';
import type { AppConfig } from '../config/schemas';
import type { ServiceDefinitions } from '../container/types';

export function registerCoreServices(
  container: AwilixContainer<ServiceDefinitions>,
  config: AppConfig
): void {
  container.register({
    config: asValue(config),
    logger: asValue(getLogger('di-container')),
  });
}
