using Managing.Domain.Accounts;
using Managing.Domain.Backtests;
using Managing.Domain.Candles;
using Managing.Domain.MoneyManagements;
using Managing.Domain.Scenarios;
using Managing.Domain.Users;
using static Managing.Common.Enums;

namespace Managing.Application.Abstractions.Services
{
    public interface IBacktester
    {
        Task<Backtest> RunScalpingBotBacktest(
            Account account,
            MoneyManagement moneyManagement,
            Ticker ticker,
            Scenario scenario,
            Timeframe timeframe,
            decimal balance,
            DateTime startDate,
            DateTime endDate,
            User user = null,
            bool isForWatchingOnly = false,
            bool save = false,
            List<Candle>? initialCandles = null);

        Task<Backtest> RunFlippingBotBacktest(
            Account account,
            MoneyManagement moneyManagement,
            Ticker ticker,
            Scenario scenario,
            Timeframe timeframe,
            decimal balance,
            DateTime startDate,
            DateTime endDate,
            User user = null,
            bool isForWatchingOnly = false,
            bool save = false,
            List<Candle>? initialCandles = null);

        bool DeleteBacktest(string id);
        bool DeleteBacktests();

        Task<Backtest> RunScalpingBotBacktest(Account account, MoneyManagement moneyManagement, Scenario scenario,
            Timeframe timeframe, List<Candle> candles, decimal balance, User user = null);

        Task<Backtest> RunFlippingBotBacktest(Account account, MoneyManagement moneyManagement, Scenario scenario,
            Timeframe timeframe, List<Candle> candles, decimal balance, User user = null);

        // User-specific operations
        Task<IEnumerable<Backtest>> GetBacktestsByUser(User user);
        Backtest GetBacktestByIdForUser(User user, string id);
        bool DeleteBacktestByUser(User user, string id);
        bool DeleteBacktestsByUser(User user);
    }
}