using System.Threading;
using System.Threading.Tasks;
namespace FrameworkBLL.Entitlement
{
// ============================================================
// IEntitlementGateClient — Framework-side gate for the Entitlement
// module's IsFeatureEnabledAsync check. Entitlement/EntitlementSL folds
// into PlatformHost, a separate process from this Framework host with no
// shared DI container, so IEntitlementService cannot be constructor-
// injected directly here — this calls it over HTTP via the same
// loopback-via-YARP-gateway pattern as the existing "eip-internal" client.
// ============================================================
public interface IEntitlementGateClient
{
///
/// True if the feature is enabled for this client/user, per Entitlement's
/// 9-layer resolution engine. Fails OPEN (returns true) on any network/
/// deserialization error — a transient gateway hiccup should not hide an
/// entire portlet-type/dashboard list from a client whose entitlement is
/// actually fine; this is a display-time filter, not a hard security gate.
///
Task IsFeatureEnabledAsync(int clientId, int userId, string featureCode, CancellationToken ct = default);
}
}