<?php

declare(strict_types=1);

namespace Drupal\flowdrop_runtime\Event;

use Symfony\Contracts\EventDispatcher\Event;

/**
 * Event dispatched when a node is skipped during execution.
 *
 * @internal
 */
class NodeSkippedEvent extends Event {

  /**
   * The event name.
   */
  const NAME = 'flowdrop.node.skipped';

  /**
   * Constructs a new NodeSkippedEvent.
   *
   * @param array $nodeData
   *   The node data array.
   * @param string $executionId
   *   The execution ID.
   * @param string $workflowId
   *   The workflow ID.
   * @param string $reason
   *   The reason for skipping.
   */
  public function __construct(
    public readonly array $nodeData,
    public readonly string $executionId,
    public readonly string $workflowId,
    public readonly string $reason,
  ) {}

}
