<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\ValueObject;

use Drupal\ffmpeg_media\Service\ConversionConfigResolverInterface;
use Drupal\ffmpeg_media\Service\ConversionLifecycleHandlerInterface;
use Drupal\ffmpeg_media\Service\FFmpegExecutorInterface;
use Drupal\ffmpeg_media\Service\FFprobeCacheServiceInterface;
use Drupal\ffmpeg_media\Service\MediaConversionInspectorInterface;
use Drupal\ffmpeg_media\Service\OutputExecutionRunnerInterface;
use Drupal\ffmpeg_media\Service\ProcessorPipelineRunnerInterface;
use Drupal\ffmpeg_media\Service\ProfileManagerInterface;
use Drupal\ffmpeg_media\Service\ProgressTrackerInterface;
use Drupal\ffmpeg_media\Service\QueueManagerInterface;

/**
 * Groups domain-specific dependencies for the video conversion orchestrator.
 *
 * Reduces constructor parameter count by bundling related conversion
 * pipeline services into a single injectable aggregate.
 *
 * This value object aggregates 10 pipeline services. While it hides the
 * effective dependency count of VideoConverter (6 direct + 10 indirect),
 * it is a deliberate trade-off between constructor ergonomics and explicit
 * coupling visibility. Future decomposition may split this into smaller
 * cohesive groups (e.g. OutputPipeline, ProgressCoordinator) when the
 * conversion orchestrator is further refactored.
 */
final readonly class ConversionDependencies {

  /**
   * Constructs a ConversionDependencies object.
   *
   * @param \Drupal\ffmpeg_media\Service\FFmpegExecutorInterface $ffmpegExecutor
   *   FFmpeg executor.
   * @param \Drupal\ffmpeg_media\Service\ProgressTrackerInterface $progressTracker
   *   Progress tracker.
   * @param \Drupal\ffmpeg_media\Service\ProfileManagerInterface $profileManager
   *   Profile manager.
   * @param \Drupal\ffmpeg_media\Service\QueueManagerInterface $queueManager
   *   Queue manager.
   * @param \Drupal\ffmpeg_media\Service\FFprobeCacheServiceInterface $ffprobeCache
   *   FFprobe cache.
   * @param \Drupal\ffmpeg_media\Service\ProcessorPipelineRunnerInterface $processorPipelineRunner
   *   Processor pipeline runner.
   * @param \Drupal\ffmpeg_media\Service\ConversionConfigResolverInterface $configResolver
   *   Conversion config resolver.
   * @param \Drupal\ffmpeg_media\Service\ConversionLifecycleHandlerInterface $lifecycleHandler
   *   Conversion lifecycle handler.
   * @param \Drupal\ffmpeg_media\Service\OutputExecutionRunnerInterface $outputExecutionRunner
   *   Output execution runner.
   * @param \Drupal\ffmpeg_media\Service\MediaConversionInspectorInterface $mediaConversionInspector
   *   Media conversion inspector.
   */
  public function __construct(
    public FFmpegExecutorInterface $ffmpegExecutor,
    public ProgressTrackerInterface $progressTracker,
    public ProfileManagerInterface $profileManager,
    public QueueManagerInterface $queueManager,
    public FFprobeCacheServiceInterface $ffprobeCache,
    public ProcessorPipelineRunnerInterface $processorPipelineRunner,
    public ConversionConfigResolverInterface $configResolver,
    public ConversionLifecycleHandlerInterface $lifecycleHandler,
    public OutputExecutionRunnerInterface $outputExecutionRunner,
    public MediaConversionInspectorInterface $mediaConversionInspector,
  ) {}

}
