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

namespace Managing.Application.Abstractions
{
    public interface IScenarioService
    {
        Task<Scenario> CreateScenario(string name, List<string> strategies, int? loopbackPeriod = 1);
        Task<IEnumerable<IndicatorBase>> GetIndicatorsAsync();
        Task<bool> UpdateScenario(string name, List<string> strategies, int? loopbackPeriod);

        Task<bool> UpdateStrategy(IndicatorType indicatorType, string name, int? period, int? fastPeriods,
            int? slowPeriods,
            int? signalPeriods, double? multiplier, int? stochPeriods, int? smoothPeriods, int? cyclePeriods);

        Task<IEnumerable<Scenario>> GetScenariosByUserAsync(User user);
        Task<Scenario> CreateScenarioForUser(User user, string name, List<string> strategies, int? loopbackPeriod = 1);
        Task<IEnumerable<IndicatorBase>> GetIndicatorsByUserAsync(User user);
        Task<bool> DeleteIndicatorByUser(User user, string name);
        Task<bool> DeleteScenarioByUser(User user, string name);
        Task<Scenario> GetScenarioByUser(User user, string name);

        Task<IndicatorBase> CreateIndicatorForUser(User user,
            IndicatorType 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);

        Task<bool> DeleteStrategiesByUser(User user);
        Task<bool> DeleteScenariosByUser(User user);
        Task<bool> UpdateScenarioByUser(User user, string name, List<string> strategies, int? loopbackPeriod);

        Task<bool> UpdateIndicatorByUser(User user, IndicatorType indicatorType, string name, int? period,
            int? fastPeriods,
            int? slowPeriods, int? signalPeriods, double? multiplier, int? stochPeriods, int? smoothPeriods,
            int? cyclePeriods);

        Task<Scenario> GetScenarioByNameAndUserAsync(string scenarioName, User user);
    }
}