#pragma once

#include "Input/EventManager.h"
#include "Input/InputManager.h"
#include "SDLContext.h"
#include "Window/WindowManager.h"

namespace quokka_gfx
{
//--------------------------------------------------------------
class Application
{
  friend class EventManager;
  friend class WindowManager;
  friend class Window;

  public:
  Application();                                                    // Default constructor
  virtual ~Application()                             = default;     // Default destructor
  Application(const Application &obj)                = delete;      // Copy constructor
  Application(Application &&obj) noexcept            = delete;      // Move constructor
  Application &operator=(const Application &obj)     = delete;      // Copy assignment operator
  Application &operator=(Application &&obj) noexcept = delete;      // Move assignment operator

  [[nodiscard]] WindowManager *GetWindowManager() noexcept;     // Get the WindowManager instance

  void Run() const;     // Start the main event loop

  protected:
  SDLContext::pContext m_sdlContext = nullptr;     // SDLContext instance
  EventManager         m_eventManager;             // EventManager instance
  InputManager         m_inputManager;             // InputManager instance
  WindowManager        m_windowManager;            // WindowManager instance
};
//--------------------------------------------------------------
}     // namespace quokka_gfx
