using Managing.Domain.Bots;
using Managing.Domain.Candles;
using Managing.Domain.Indicators;

namespace Managing.Application.Abstractions.Grains;

/// <summary>
/// Orleans grain interface for scenario execution and signal generation.
/// This stateless grain handles candle management and signal generation for live trading.
/// </summary>
public interface IScenarioRunnerGrain : IGrainWithGuidKey
{
    /// <summary>
    /// Generates signals based on the current candles and scenario
    /// </summary>
    /// <param name="config">The trading bot configuration</param>
    /// <param name="previousSignals">Previous signals to consider</param>
    /// <param name="startDate">Start date</param>
    /// <returns>The generated signal or null if no signal</returns>
    Task<LightSignal> GetSignals(TradingBotConfig config, Dictionary<string, LightSignal> previousSignals, DateTime startDate,
        Candle candle);
}