<?php

namespace MintyPHP\App\Module\Contracts;

/**
 * Interface for module event listeners.
 *
 * Modules declare listeners in their manifest under 'event_listeners'.
 * The dispatcher resolves listeners from the container and calls handle().
 */
interface EventListener
{
    /**
     * @param string $event Event name (e.g. 'user.deleted')
     * @param array<string, mixed> $payload Event-specific data
     */
    public function handle(string $event, array $payload): void;
}
