using Managing.Application.Abstractions;
using Managing.Application.Abstractions.Services;
using Managing.Domain.MoneyManagements;
using Microsoft.Extensions.Logging;
using static Managing.Common.Enums;

namespace Managing.Application.Bots
{
    public class FlippingBot : TradingBot
    {
        public FlippingBot(string accountName,
            MoneyManagement moneyManagement,
            string name,
            string scenarioName,
            IExchangeService exchangeService,
            Ticker ticker,
            ITradingService tradingService,
            ILogger<TradingBot> logger,
            Timeframe timeframe,
            IAccountService accountService,
            IMessengerService messengerService,
            IBotService botService,
            decimal initialTradingBalance,
            bool isForBacktest = false,
            bool isForWatchingOnly = false)
            : base(accountName,
                moneyManagement,
                name,
                ticker,
                scenarioName,
                exchangeService,
                logger,
                tradingService,
                timeframe,
                accountService,
                messengerService,
                botService,
                initialTradingBalance,
                isForBacktest,
                isForWatchingOnly,
                flipPosition: true)
        {
            BotType = BotType.FlippingBot;
        }

        public sealed override void Start()
        {
            Logger.LogInformation($"{Name} - Bot Started");
            base.Start();
            Logger.LogInformation($"Starting {Name} bot - Status : {Status}");
        }
    }
}