#pragma once

#include <godot_cpp/classes/node.hpp>

namespace blitz {

class Lobby;
class NetworkInterface;

class Server : public godot::Node {
	GDCLASS(Server, godot::Node)
  protected:
	static void _bind_methods();

  public:
	Server();
	~Server();

	void _ready() override;

    void OnPlayerConnect(uint64_t a_PeerId);
    void OnPlayerDisconnect(uint64_t a_PeerId);

  private:
    Lobby* m_Lobby;
    NetworkInterface* m_NetworkInterface;

    godot::TypedArray<uint64_t> m_Peers;
};

}  // namespace blitz