#pragma once

#include "statistical_class.hh"
#include "../../3rdParty/opennn/data_set.h"
#include <string>
#include <vector>
#include <functional>
#include <memory>

class ChartCandle;
class QDateTime;

using DateTimeFilter = std::function<bool(const QDateTime&)>;

class ForecastingData
{
public:
    ForecastingData();
    void data(std::shared_ptr<std::vector<ChartCandle>> data);
    void trainingFile(const std::string& trainingFileName);
    void testingFile(const std::string& testingFileName);
    void priceBounds(const std::vector<StatisticalClass>& bounds);
    void dateTimeFilter(DateTimeFilter filter);
    void validation(bool validation);
    std::pair<OpenNN::DataSet, OpenNN::DataSet> makeDataset() const;

private:
    std::pair<OpenNN::DataSet, OpenNN::DataSet> generateDataset() const;

private:
    std::shared_ptr<std::vector<ChartCandle>> data_;
    std::string trainingFile_;
    std::string testingFile_;
    std::vector<StatisticalClass> bounds_;
    DateTimeFilter filter_;
    bool validation_;
};

