<?php

declare(strict_types=1);

namespace Drupal\flowdrop_interrupt\Event;

use Drupal\flowdrop_interrupt\Entity\FlowDropInterruptInterface;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * Event dispatched when an interrupt is resolved.
 *
 * @internal This class is not part of the public API and may change without notice.
 */
class InterruptResolvedEvent extends Event {

  /**
   * The event name.
   */
  const NAME = 'flowdrop_interrupt.resolved';

  /**
   * Constructs a new InterruptResolvedEvent.
   *
   * @param \Drupal\flowdrop_interrupt\Entity\FlowDropInterruptInterface $interrupt
   *   The resolved interrupt entity.
   * @param mixed $responseData
   *   The response data provided by the user.
   * @param int|null $resolvedBy
   *   The user ID of the resolver, if applicable.
   */
  public function __construct(
    public readonly FlowDropInterruptInterface $interrupt,
    public readonly mixed $responseData,
    public readonly ?int $resolvedBy,
  ) {}

}
