<?php

namespace MintyPHP\App\Module\Contracts;

use MintyPHP\App\AppContainer;

/**
 * Provides module-specific data for the layout navigation context.
 *
 * Called from appBuildLayoutNavContext() after Core data assembly.
 * Return value is merged into the $layoutNav array passed to templates.
 *
 * IMPORTANT: Only called in web request context. CLI/scheduler callers
 * must not invoke layout context providers. Implementations should use
 * try/catch around request-dependent calls (e.g. requestInput()) as a
 * defensive measure.
 */
interface LayoutContextProvider
{
    /**
     * @param array<string, mixed> $session Current session data
     * @return array<string, mixed> Key-value pairs to merge into $layoutNav
     */
    public function provide(array $session, AppContainer $container): array;
}
