#ifndef __UI__PYTHON_CONSOLE_H__
#define __UI__PYTHON_CONSOLE_H__

#include <string>
#include <vector>
#include <imgui.h>
#include "../scripting/PythonEngine.h"

class PythonConsole
{
public:
    PythonConsole();
    ~PythonConsole() = default;
    
    void Toggle();
    bool IsOpen() const { return showConsole; };
    void Render();
    void AddLog(const std::string& message);

private:
    void ExecuteCommand(const std::string& command);
    
    bool showConsole = false;
    char inputBuffer[256] = {0};
    std::vector<std::string> logLines;
    std::vector<std::string> history;
    int historyPos = -1;
    bool scrollToBottom = true;
    bool reclaimFocus = false;

};

#endif