#include "DeerStudio/EditorEngine/API/Debug.h"
#include "Deer/Log.h"

#include "angelscript.h"
#include "imgui.h"

namespace Deer {
    namespace EditorEngine {
        
        void errorCallback(const asSMessageInfo *msg, void *param) {
          if (msg->type == asMSGTYPE_WARNING) {
            DEER_UI_ENGINE_WARN("{0}:{1}:{2}) : {3}", msg->section, msg->row, msg->col, msg->message);
          } else if( msg->type == asMSGTYPE_INFORMATION )  {
            DEER_UI_ENGINE_ERROR("{0}:{1}:{2}) : {3}", msg->section, msg->row, msg->col, msg->message);
          } else if (msg->type == asMSGTYPE_INFORMATION){
            DEER_UI_ENGINE_TRACE("{0}:{1}:{2}) : {3}", msg->section, msg->row, msg->col, msg->message);
          }
        }

        void print(std::string& msg) {
            DEER_UI_ENGINE_INFO("{0}", msg.c_str());
        }

    }
}