<?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 expires.
 *
 * @internal This class is not part of the public API and may change without notice.
 */
class InterruptExpiredEvent extends Event {

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

  /**
   * Constructs a new InterruptExpiredEvent.
   *
   * @param \Drupal\flowdrop_interrupt\Entity\FlowDropInterruptInterface $interrupt
   *   The expired interrupt entity.
   */
  public function __construct(
    public readonly FlowDropInterruptInterface $interrupt,
  ) {}

}
