#pragma once

#include "GuiWidget.h"
#include "blitz/misc/Time.h"
#include "client/config/BlitzConfig.h"
#include <array>
#include <string>

namespace blitz {

class Client;

namespace gui {

class OptionsMenu : public GuiWidget {
  private:
	bool m_ShowFPS;
	bool m_VSync;
	bool m_IsKeyPopupOpen;
	bool m_KeyPopupShouldClose;
	utils::Timer m_Timer{100};
	KeyAction m_CurrentAction;

  public:
	OptionsMenu(GuiWidget* parent, Client* client);

	virtual void Render() override;

	void OnKeyEvent(int key);

  private:
	std::string GetKeyActionCodeName(KeyAction);
	void HotkeyBindingButton();
	void HotkeyBindingPopUp();
};

}  // namespace gui
}  // namespace blitz
