<?php

declare(strict_types=1);

namespace Drupal\flowdrop_trigger\Event;

use Drupal\flowdrop_trigger\FlowDropTriggerConfigInterface;
use Drupal\flowdrop_orchestration\DTO\Orchestrator\OrchestrationResponse;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * Event dispatched after a trigger executes.
 *
 * @internal This class is not part of the public API and may change without notice.
 */
class TriggerPostExecuteEvent extends Event {

  /**
   * The event name.
   */
  const NAME = 'flowdrop_trigger.post_execute';

  /**
   * Constructs a new TriggerPostExecuteEvent.
   *
   * @param \Drupal\flowdrop_trigger\FlowDropTriggerConfigInterface $config
   *   The trigger configuration.
   * @param string $eventType
   *   The event type.
   * @param \Drupal\flowdrop_orchestration\DTO\Orchestrator\OrchestrationResponse $response
   *   The orchestration response.
   */
  public function __construct(
    public readonly FlowDropTriggerConfigInterface $config,
    public readonly string $eventType,
    public readonly OrchestrationResponse $response,
  ) {}

}
