<?php

declare(strict_types=1);

namespace Drupal\flowdrop_session\Service;

use Drupal\flowdrop_session\Entity\FlowDropSessionMessageInterface;

/**
 * Interface for session message processing.
 *
 * Implementations handle the execution of workflow logic triggered by
 * a user message in a session.
 *
 * @internal
 *   This class is not part of the public API and may change without notice.
 */
interface MessageProcessorInterface {

  /**
   * Processes a session message by executing the associated workflow.
   *
   * @param \Drupal\flowdrop_session\Entity\FlowDropSessionMessageInterface $message
   *   The message to process.
   *
   * @throws \Exception
   *   If processing fails.
   */
  public function processMessage(FlowDropSessionMessageInterface $message): void;

}
