using Managing.Domain.Scenarios;
using Managing.Domain.Strategies;
using Managing.Domain.Users;
using static Managing.Common.Enums;

namespace Managing.Application.Abstractions
{
    public interface IScenarioService
    {
        IEnumerable<Scenario> GetScenarios();
        Scenario CreateScenario(string name, List<string> strategies, int? loopbackPeriod = 1);
        IEnumerable<Strategy> GetStrategies();
        bool DeleteStrategy(string name);
        bool DeleteScenario(string name);
        Scenario GetScenario(string name);

        Strategy CreateStrategy(StrategyType type,
            string name,
            int? period = null,
            int? fastPeriods = null,
            int? slowPeriods = null,
            int? signalPeriods = null,
            double? multiplier = null,
            int? stochPeriods = null,
            int? smoothPeriods = null,
            int? cyclePeriods = null);

        bool DeleteStrategies();
        bool DeleteScenarios();
        bool UpdateScenario(string name, List<string> strategies, int? loopbackPeriod);

        bool UpdateStrategy(StrategyType strategyType, string name, int? period, int? fastPeriods, int? slowPeriods,
            int? signalPeriods, double? multiplier, int? stochPeriods, int? smoothPeriods, int? cyclePeriods);

        IEnumerable<Scenario> GetScenariosByUser(User user);
        Scenario CreateScenarioForUser(User user, string name, List<string> strategies, int? loopbackPeriod = 1);
        IEnumerable<Strategy> GetStrategiesByUser(User user);
        bool DeleteStrategyByUser(User user, string name);
        bool DeleteScenarioByUser(User user, string name);
        Scenario GetScenarioByUser(User user, string name);
        
        Strategy CreateStrategyForUser(User user,
            StrategyType type,
            string name,
            int? period = null,
            int? fastPeriods = null,
            int? slowPeriods = null,
            int? signalPeriods = null,
            double? multiplier = null,
            int? stochPeriods = null,
            int? smoothPeriods = null,
            int? cyclePeriods = null);
            
        bool DeleteStrategiesByUser(User user);
        bool DeleteScenariosByUser(User user);
        bool UpdateScenarioByUser(User user, string name, List<string> strategies, int? loopbackPeriod);
        
        bool UpdateStrategyByUser(User user, StrategyType strategyType, string name, int? period, int? fastPeriods, 
            int? slowPeriods, int? signalPeriods, double? multiplier, int? stochPeriods, int? smoothPeriods, int? cyclePeriods);
    }
}