#pragma once

#include <memory>
#include <vector>

#include "blitz/Defines.h"

namespace blitz {

class Client;

namespace gui {

class GuiWidget {
  protected:
	bool m_Enabled;
	Client* m_Client;
	GuiWidget* m_Parent;
	std::vector<std::unique_ptr<GuiWidget>> m_SubWidgets;

  public:
	GuiWidget(GuiWidget* parent, Client* client) : m_Enabled(false), m_Client(client), m_Parent(parent) {}
	virtual ~GuiWidget() {}

	void Enable() {
		m_Enabled = true;
	}

	void Disable() {
		m_Enabled = false;
	}

	void SetState(bool enable) {
		m_Enabled = enable;
	}

	bool IsEnabled() const {
		return m_Enabled;
	}

	void AddWidget(std::unique_ptr<GuiWidget>&& widget) {
		m_SubWidgets.push_back(std::move(widget));
	}

	virtual void Render() {
		for (auto& widget : m_SubWidgets) {
			widget->Render();
		}
	}

	static int GetWindowFullScreenFlags();
	static void SetNextWindowFullScreen();
};

}  // namespace gui
}  // namespace blitz
