#pragma once

#include <string>
#include <vector>

#include "lexer.h"
#include "result.h"


struct Question {
    virtual std::string ToString() const = 0;
    virtual ~Question()                  = default;
};

struct Choice {
    std::string Answer;
    bool        IsCorrect;
};

enum MultiElementType {
	Regular     = 0,
	MultiChoice,
	Order
};

struct MultiElementQuestion : public Question {
    std::string          ID;
    std::string          QuestionText;
    std::vector<Choice>  Choices;
    std::string          Section;
	MultiElementType     type;

    std::string          ToString() const override;
};

struct Group {
    std::string name;
    std::string elements;
};

struct GroupQuestion : public Question {
    std::string        ID;
    std::string        QuestionText;
	std::vector<Group> Groups;
	
    std::string        ToString() const override;
};

Result<std::vector<Question*>> ParseQuestions(const std::vector<Token>& tokens);
