#pragma once

#include <string>

class MarkdownCustomElementContext
{
public:
    MarkdownCustomElementContext(const std::string& delimiter)
        : mDelimiter(delimiter)
    {

    }

    virtual ~MarkdownCustomElementContext() = default;

    void setReplacementDelimiters(const std::string& leftReplacement, const std::string& rightReplacement)
    {
        mReplacementLeftDelimiter = leftReplacement;
        mReplacementRightDelimiter = rightReplacement;
        if (mReplacementRightDelimiter.empty())
        {
            mReplacementRightDelimiter = mReplacementLeftDelimiter;
        }
    }

    const std::string& getDelimiter() const
    {
        return mDelimiter;
    }

    const std::string& getOutputLeftDelimiter() const
    {
        if (!mReplacementLeftDelimiter.empty())
        {
            return mReplacementLeftDelimiter;
        }
        else
        {
            return mDelimiter;
        }
    }

    const std::string& getOutputRightDelimiter() const
    {
        if (!mReplacementRightDelimiter.empty())
        {
            return mReplacementRightDelimiter;
        }
        else
        {
            return mDelimiter;
        }
    }

private:
    std::string mReplacementLeftDelimiter;
    std::string mReplacementRightDelimiter;
    std::string mDelimiter;
};

class MarkdownCustomInlineElementContext : public MarkdownCustomElementContext
{
public:
    MarkdownCustomInlineElementContext(const std::string& delimiter)
        : MarkdownCustomElementContext(delimiter)
    {

    }
};

class MarkdownCustomMultilineElementContext : public MarkdownCustomElementContext
{
public:
    MarkdownCustomMultilineElementContext(const std::string& delimiter)
        : MarkdownCustomElementContext(delimiter)
    {

    }
};
