#pragma once
#include <string>
#include <memory>

struct lua_State;

namespace mosis {

class TimerManager;
class VirtualFS;

struct DesktopSandboxConfig {
    std::string app_id = "com.mosis.designer";
    std::string data_root = "./sandbox_data";
};

class DesktopSandbox {
public:
    explicit DesktopSandbox(const DesktopSandboxConfig& config);
    ~DesktopSandbox();

    void RegisterAPIs(lua_State* L);
    void UnregisterAPIs(lua_State* L);
    void Update();  // Process timers - call each frame
    void Reset();   // For hot-reload

private:
    DesktopSandboxConfig m_config;
    std::unique_ptr<TimerManager> m_timer_manager;
    std::unique_ptr<VirtualFS> m_vfs;
};

} // namespace mosis
