<?php

declare(strict_types=1);

namespace Drupal\flowdrop_stategraph\Event;

use Drupal\flowdrop_stategraph\DTO\Checkpoint;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * Event dispatched when an approval gate request is created.
 *
 * @internal This class is not part of the public API and may change without notice.
 */
class ApprovalGateRequestedEvent extends Event {

  /**
   * The event name.
   */
  const NAME = 'flowdrop_stategraph.approval_requested';

  /**
   * Constructs a new ApprovalGateRequestedEvent.
   *
   * @param \Drupal\flowdrop_stategraph\DTO\Checkpoint $checkpoint
   *   The checkpoint associated with the approval gate.
   * @param string $requestId
   *   The approval request ID.
   * @param string $nodeId
   *   The node ID.
   * @param array $context
   *   Additional context for the approval request.
   */
  public function __construct(
    public readonly Checkpoint $checkpoint,
    public readonly string $requestId,
    public readonly string $nodeId,
    public readonly array $context,
  ) {}

}
