<?php
declare(strict_types=1);

namespace Ekesto\CacheAutopilot\Access;

/**
 * Access-control override provider seam.
 *
 * Resolves the access mode for a NON-admin user. Administrators are handled by
 * {@see \Ekesto\CacheAutopilot\AccessControl} itself and never reach a provider. Lite ships
 * a no-op provider (admins only); the premium build registers a provider that
 * honors stored role/user overrides.
 *
 * This shared, Lite-safe contract never references the premium namespace.
 */
interface AccessOverrideProviderInterface
{
    /**
     * Resolve the access mode for a non-admin user.
     *
     * @param int       $userId Resolved (positive) user id.
     * @param \WP_User  $user   The corresponding user object.
     * @return string One of AccessControl::MODE_MANAGE or AccessControl::MODE_NONE.
     */
    public function resolveOverrideMode(int $userId, \WP_User $user): string;
}
