/******************************************************************************
*	File		-	gui.h
*	Author		-	Joey Pollack
*	Date		-	2021/09/09 (y/m/d)
*	Mod Date	-	2021/09/09 (y/m/d)
*	Description	-	The main class that manages Dear ImGui
******************************************************************************/

#ifndef GUI_H_
#define GUI_H_

#include <utils/op_res.h>

struct GLFWwindow;
struct ImGuiStyle;

namespace lunarium
{
    enum GuiStyle
    {
        STYLE_DEFAULT_DARK,
        STYLE_DEFAULT_LIGHT,
        STYLE_DEFAULT_CLASSIC,
        STYLE_DEEP_DARK,
        STYLE_RED_DARK,
        STYLE_GREEN_BLUE,
        STYLE_OVERSHIFTED_DARK,
        STYLE_CHARCOAL,
        STYLE_CORPORATE_GRAY,
        STYLE_CORPORATE_GRAY_3D,
    };

    class GUI
    {
    public:
        static GUI& GetInstance();
        static void FreeInstance();
        OpRes Initialize(GLFWwindow* pWindow);
        void Shutdown();

        void NewFrame();
        void EndFrame();
        void ShowDemoWindow(bool& show);

        bool WantCaptureKeyboard() const;

        void SetStyle(GuiStyle style);

    private:
        GUI();
        GUI(const GUI&) = delete;
        const GUI operator=(const GUI&) = delete;

    private:
        static GUI* mpInstance;
        bool mbIsInit;
        ImGuiStyle* mpBaseStyle;
        //bool mbShowDemo;

    private: // STYLES
        void EmbraceTheDarkness();
        void RedDark();
        void GreenBlue();
        void OverShiftedDark();
        void Charcoal();
        void CorporateGrey(int is3D = 0);

    };
}

#endif // GIU_H_