<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\ValueObject;

use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\ffmpeg_media\Service\DeadLetterStorageInterface;
use Drupal\ffmpeg_media\Service\FieldIntegrityServiceInterface;
use Drupal\ffmpeg_media\Service\LockManagerInterface;
use Drupal\ffmpeg_media\Service\OriginalFileRetentionServiceInterface;
use Drupal\ffmpeg_media\Service\ProgressTrackerInterface;
use Drupal\ffmpeg_media\Service\QueueManagerInterface;
use Drupal\ffmpeg_media\Service\RetryManagerInterface;
use Drupal\ffmpeg_media\Service\SegmentCleanupServiceInterface;

/**
 * Groups domain-specific dependencies for cron hook implementations.
 *
 * Reduces constructor parameter count by bundling related cron
 * pipeline services into a single injectable aggregate.
 *
 * @internal
 */
final readonly class CronDependencies {

  /**
   * Constructs a CronDependencies object.
   *
   * @param \Drupal\ffmpeg_media\Service\ProgressTrackerInterface $progressTracker
   *   Progress tracker service.
   * @param \Drupal\ffmpeg_media\Service\QueueManagerInterface $queueManager
   *   Queue manager service.
   * @param \Drupal\ffmpeg_media\Service\LockManagerInterface $lockManager
   *   Lock manager service.
   * @param \Drupal\ffmpeg_media\Service\RetryManagerInterface $retryManager
   *   Retry manager service.
   * @param \Drupal\ffmpeg_media\Service\OriginalFileRetentionServiceInterface $originalFileRetention
   *   Original file retention service.
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
   *   Entity type manager.
   * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
   *   Config factory.
   * @param \Drupal\ffmpeg_media\Service\FieldIntegrityServiceInterface $fieldIntegrity
   *   Field integrity service.
   * @param \Drupal\ffmpeg_media\Service\DeadLetterStorageInterface $deadLetterStorage
   *   Dead-letter storage service.
   * @param \Drupal\ffmpeg_media\Service\SegmentCleanupServiceInterface $segmentCleanup
   *   Segment cleanup service.
   * @param \Drupal\Core\Lock\LockBackendInterface $lockBackend
   *   Drupal core lock backend for cron re-entry protection.
   */
  public function __construct(
    public ProgressTrackerInterface $progressTracker,
    public QueueManagerInterface $queueManager,
    public LockManagerInterface $lockManager,
    public RetryManagerInterface $retryManager,
    public OriginalFileRetentionServiceInterface $originalFileRetention,
    public EntityTypeManagerInterface $entityTypeManager,
    public ConfigFactoryInterface $configFactory,
    public FieldIntegrityServiceInterface $fieldIntegrity,
    public DeadLetterStorageInterface $deadLetterStorage,
    public SegmentCleanupServiceInterface $segmentCleanup,
    public LockBackendInterface $lockBackend,
  ) {}

}
