<?php

declare(strict_types=1);

namespace Drupal\flowdrop_runtime\Event;

use Symfony\Contracts\EventDispatcher\Event;

/**
 * Event dispatched when a workflow execution is interrupted.
 *
 * @internal
 */
class WorkflowInterruptedEvent extends Event {

  /**
   * The event name.
   */
  const NAME = 'flowdrop.workflow.interrupted';

  /**
   * Constructs a new WorkflowInterruptedEvent.
   *
   * @param string $executionId
   *   The execution ID.
   * @param string $workflowId
   *   The workflow ID.
   * @param array $interrupt
   *   The interrupt data array.
   * @param array $interruptContext
   *   The execution context at the time of interruption.
   */
  public function __construct(
    public readonly string $executionId,
    public readonly string $workflowId,
    public readonly array $interrupt,
    public readonly array $interruptContext,
  ) {}

}
