using NT8.Core.Common.Models;
using System;
using System.Threading.Tasks;

namespace NT8.Core.Risk
{
    /// <summary>
    /// Risk management interface - validates and modifies trading intents
    /// </summary>
    public interface IRiskManager
    {
        /// <summary>
        /// Check if order intent passes risk validation
        /// </summary>
        RiskDecision ValidateOrder(StrategyIntent intent, StrategyContext context, RiskConfig config);

        /// <summary>
        /// Update risk state after fill
        /// </summary>
        void OnFill(OrderFill fill);

        /// <summary>
        /// Update risk state after P&L change
        /// </summary>
        void OnPnLUpdate(double netPnL, double dayPnL);

        /// <summary>
        /// Emergency flatten all positions
        /// </summary>
        Task<bool> EmergencyFlatten(string reason);

        /// <summary>
        /// Get current risk status
        /// </summary>
        RiskStatus GetRiskStatus();
    }
}