using Managing.Common;
using Managing.Domain.Bots;
using Managing.Domain.MoneyManagements;
using Managing.Domain.Users;
using Managing.Domain.Workflows;

namespace Managing.Application.Abstractions;

public interface IBotService
{
    void SaveOrUpdateBotBackup(BotBackup botBackup);
    void SaveOrUpdateBotBackup(User user, string identifier, Enums.BotType botType, string data);
    void AddSimpleBotToCache(IBot bot);
    void AddTradingBotToCache(ITradingBot bot);
    List<ITradingBot> GetActiveBots();
    IEnumerable<BotBackup> GetSavedBots();
    void StartBotFromBackup(BotBackup backupBot);
    BotBackup GetBotBackup(string name);

    ITradingBot CreateScalpingBot(string accountName, MoneyManagement moneyManagement, string name, Enums.Ticker ticker,
        string scenario, Enums.Timeframe interval, bool isForWatchingOnly, decimal initialTradingAmount);

    ITradingBot CreateBacktestScalpingBot(string accountName, MoneyManagement moneyManagement, Enums.Ticker ticker,
        string scenario, Enums.Timeframe interval, bool isForWatchingOnly, decimal initialTradingAmount);

    ITradingBot CreateFlippingBot(string accountName, MoneyManagement moneyManagement, string name, Enums.Ticker ticker,
        string scenario, Enums.Timeframe interval, bool isForWatchingOnly, decimal initialTradingAmount);

    ITradingBot CreateBacktestFlippingBot(string accountName, MoneyManagement moneyManagement, Enums.Ticker ticker,
        string scenario, Enums.Timeframe interval, bool isForWatchingOnly, decimal initialTradingAmount);

    IBot CreateSimpleBot(string botName, Workflow workflow);
    Task<string> StopBot(string requestName);
    Task<bool> DeleteBot(string requestName);
    Task<string> RestartBot(string requestName);
    void DeleteBotBackup(string backupBotName);
    void ToggleIsForWatchingOnly(string botName);
}