#pragma once
#include <string>
#include <unordered_map>
#include <variant>
#include <optional>
#include <mutex>

class LuaGlobalBridge
{
public:
    using Value = std::variant<double, bool, std::string>;

    static void Set(const std::string& key, const Value& value);
    static std::optional<Value> Get(const std::string& key);

    static std::unordered_map<std::string, Value> GetAll();

    static void Clear();



private:
    static inline std::unordered_map<std::string, Value> globals;
    static inline std::mutex mutex;
};
