#ifndef LAYER_SWITCHER_HPP
#define LAYER_SWITCHER_HPP

#include <open_engine.hpp>

class ControlLayer : public OpenEngine::Layer
{
    public:
        ControlLayer(OpenEngine::Ref<OpenEngine::Layer> layer);
        ControlLayer();
        ~ControlLayer() = default;

        void OnUpdate() override;
        void OnEvent(OpenEngine::Event& event) override;
        void OnImGuiRender() override;
        void OnAttach() override;
        void OnDetach() override;

    private:
        bool SwitchLayer(OpenEngine::KeyPressedEvent& event);
        bool SwitchExistingLayer(OpenEngine::KeyPressedEvent& event);
        bool StopRunning(OpenEngine::KeyPressedEvent& event);

        OpenEngine::Ref<OpenEngine::Layer> active_layer;
};

#endif // LAYER_SWITCHER_HPP
