#pragma once
#include <string>
#include <vector>

class asIScriptEngine;
class asIScriptModule;
class asIScriptContext;
class CScriptBuilder;

namespace Deer {
    // This namespace implements all interface ported from c++ ImGui to an easier lua aproach with simplifications
    namespace EditorEngine {
        class DockPanelContext;
        class DockPanelObject;
        class ServiceScriptContext;

        void initialize();
        void deinitialize();

        void render();

        // INTERNAL
        // Panels
        extern asIScriptEngine* scriptEngine;
        extern asIScriptContext* executingScriptContext;
        extern CScriptBuilder scriptBuilder;
        
        extern std::vector<DockPanelContext> dockPanelModules;
        extern std::vector<ServiceScriptContext> serviceScriptModules;
        extern DockPanelObject* currentDockPanelExecution;

        void loadDockPanels();
        void loadServiceScripts();

        void registerEditorEngineFunctions();
        void registerEditorEngineStructs();
    }

    namespace DataStore {
        int getIconId(const std::string& name);
    }
}