<?php

declare(strict_types=1);

namespace Drupal\flowdrop_pipeline\Event;

use Drupal\flowdrop_pipeline\Entity\FlowDropPipelineInterface;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * Event dispatched when all jobs have been generated for a pipeline.
 *
 * @internal
 */
class PipelineJobsGeneratedEvent extends Event {

  /**
   * The event name.
   */
  const NAME = 'flowdrop.pipeline.jobs_generated';

  /**
   * Constructs a new PipelineJobsGeneratedEvent.
   *
   * @param \Drupal\flowdrop_pipeline\Entity\FlowDropPipelineInterface $pipeline
   *   The pipeline entity.
   * @param int $jobsCreated
   *   The number of jobs created.
   * @param array $jobIds
   *   The IDs of the created jobs.
   */
  public function __construct(
    public readonly FlowDropPipelineInterface $pipeline,
    public readonly int $jobsCreated,
    public readonly array $jobIds,
  ) {}

}
