<?php

declare(strict_types=1);

namespace Drupal\flowdrop_runtime\Event;

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

/**
 * Event dispatched when a pipeline is created from a workflow.
 *
 * @internal
 */
class PipelineCreatedEvent extends Event {

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

  /**
   * Constructs a new PipelineCreatedEvent.
   *
   * @param \Drupal\flowdrop_pipeline\Entity\FlowDropPipelineInterface $pipeline
   *   The created pipeline entity.
   * @param string $workflowId
   *   The workflow ID.
   * @param array $inputData
   *   The input data.
   * @param array $config
   *   The configuration options.
   */
  public function __construct(
    public readonly FlowDropPipelineInterface $pipeline,
    public readonly string $workflowId,
    public readonly array $inputData,
    public readonly array $config,
  ) {}

}
