//
// Created by sebastian on 29.07.26.
//

#ifndef COLORRACE_APPLICATION_H
#define COLORRACE_APPLICATION_H
#include <memory>
#include <string>

#include "EngineConfig.h"

#include "Window.h"
#include "audio/AudioDevice.h"
#include "inputsOutputs/context/InputContextStack.h"
#include "inputsOutputs/inputs/Keyboard.h"
#include "inputsOutputs/inputs/Mouse.h"
#include "layer/SceneManager.h"
#include "ui/ImGuiContext.h"


namespace engine {
    class Application {
    public:
        Application(const EngineConfig& config);
        virtual ~Application();

        void run();

    protected:
        virtual void onUpdate(float deltaTime) {}
        virtual void onRender() {}
        InputContextStack& getInputContextStack() { return m_inputContextStack; }
        SceneManager& getSceneManager() { return m_sceneManager; }
        Keyboard& getKeyboard() { return m_keyboard; }
        Mouse& getMouse() { return m_mouse; }

    private:
        EngineConfig m_config;
        std::unique_ptr<Window> m_window;
        InputContextStack m_inputContextStack;
        Keyboard m_keyboard{*m_window};   // braucht Window& im Konstruktor
        Mouse m_mouse{*m_window};
        SceneManager m_sceneManager{m_inputContextStack};
        ImGuiContext m_imguiContext{*m_window}; // neu
        engine::audio::AudioDevice m_audioDevice;

    };

}




#endif //COLORRACE_APPLICATION_H
