#pragma once

#include "GuiWidget.h"
#include "client/Client.h"
#include <string>
#include <vector>

namespace blitz {

namespace gui {

class GameChatGui : public GuiWidget, ChatListener {
  private:
	char InputBuf[256];
	std::vector<protocol::ColoredText> m_Lines;
	bool m_FocusRequested = false;

	void Draw(const char* title, bool* p_open);

  public:
	GameChatGui(GuiWidget* parent, Client* client);
	virtual void OnTextChatReceived(const protocol::ColoredText& text);

	virtual void Render() override;
};

}  // namespace gui
}  // namespace blitz
