using NT8.Core.Common.Models;
using System;
using System.Collections.Generic;

namespace NT8.Core.Tests
{
    public static class TestDataBuilder
    {
        public static StrategyIntent CreateValidIntent(
            string symbol = "ES",
            int stopTicks = 8,
            OrderSide side = OrderSide.Buy)
        {
            return new StrategyIntent(
                symbol: symbol,
                side: side,
                entryType: OrderType.Market,
                limitPrice: null,
                stopTicks: stopTicks,
                targetTicks: 16,
                confidence: 0.8,
                reason: "Test intent",
                metadata: new Dictionary<string, object>()
            );
        }

        public static StrategyContext CreateTestContext(string symbol = "ES")
        {
            return new StrategyContext(
                symbol: symbol,
                currentTime: DateTime.UtcNow,
                currentPosition: new Position(symbol, 0, 0, 0, 0, DateTime.UtcNow),
                account: new AccountInfo(50000, 50000, 0, 0, DateTime.UtcNow),
                session: new MarketSession(DateTime.Today.AddHours(9.5), DateTime.Today.AddHours(16), true, "RTH"),
                customData: new Dictionary<string, object>()
            );
        }

        public static RiskConfig CreateTestRiskConfig()
        {
            return new RiskConfig(
                dailyLossLimit: 1000,
                maxTradeRisk: 500,
                maxOpenPositions: 5,
                emergencyFlattenEnabled: true
            );
        }
    }
}