#pragma once

#include <blitz/common/Types.h>
#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(PeerID a_PeerId);
	void OnPlayerDisconnect(PeerID a_PeerId);

  private:
	Lobby* m_Lobby;
	NetworkInterface* m_NetworkInterface;

	godot::TypedArray<PeerID> m_Peers;
};

}  // namespace blitz