<?php
/**
 * Session manager events — dispatches to Activity Log via hook.
 *
 * @package LoginSessionManager
 */

namespace LoginSessionManager\Includes;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Session_Audit_Log {

	/**
	 * @param array<string, mixed> $context
	 */
	public static function dispatch(
		string $action,
		int $actor_id,
		int $target_user_id,
		string $verifier = '',
		array $context = []
	): void {
		unset( $verifier );

		/**
		 * Fires when a session manager event occurs (revocation, limit enforced, etc.).
		 *
		 * @param string               $action         Event key.
		 * @param int                  $actor_id       User performing the action.
		 * @param int                  $target_user_id Affected user ID.
		 * @param array<string, mixed> $context        Additional context.
		 */
		do_action( 'wp_powersuite_session_manager_event', $action, $actor_id, $target_user_id, $context );
	}
}
