#pragma once

#include <functional>

class TrayIcon
{
    public:
        TrayIcon();
        ~TrayIcon();

        bool init();
        void shutdown();
        void processMessages();

        void onToggleConsole();
        void onOpenControlPanel();
        void onExit();

        void setExitCallback(std::function<void()> callback);

    private:
        static void* windowProc(void* hwnd, unsigned int msg, unsigned long long wParam, long long lParam);
        static TrayIcon* instance;

        void* _hwnd;
        bool _isConsoleVisible;
        std::function<void()> _exitCallback;
};
