#ifndef SRCEDIT_STORYBOARD_H
#define SRCEDIT_STORYBOARD_H

#include "DocsManager.h"
#include "keywordshighlighter.h"

#include <QTextEdit>

namespace Components {

    class StoryboardSourceEdit : public Presents::ModeView, public MakeTools::CompileFeature,
            public MakeTools::FilePresent, public Enhancement::HighlightFeature
    {
    public:
        StoryboardSourceEdit();
        virtual ~StoryboardSourceEdit() = default;

        // ModeView interface
    public:
        virtual void modeReset(const QString &type) const override;
        virtual QList<QString> modes() const override;
        virtual QString currentMode() const override;


    private:
        QSyntaxHighlighter *const words_highlighter;
        Core::AppCore *core_temp;
        QString filepath_store;
        QString name_store;
        QTextEdit *edit_square;

        // HighlightDemand interface
    public:
      virtual void contexBinding(Core::AppCore *app) override;
      virtual void renderRepeat() const override;

      // ContentPresent interface
    public:
        virtual QList<QString> suffixes() const override;
        virtual std::tuple<bool, QString> create(const QDir &target, const QString &name, const QString &suffix) override;
        virtual MakeTools::FilePresent *newInst() const override;
        virtual QWidget *widget() const override;
        virtual QString name() const override;
        virtual void load(const QFileInfo &target_file) override;
        virtual void saveAs(const QString &path) override;
        virtual QString relativeTargetPath(const QDir &base) const override;
        virtual QString absoluteTargetPath() const override;
        virtual QString getText() const override;
        virtual bool isModified() const override;
        virtual void applySetting(const QString &name, Core::AppCore *core) override;
        virtual void jumpTo(const QList<QString> &path) override;
        virtual Features features() override;
    };
}

#endif // SRCEDIT_STORYBOARD_H
