#pragma once

#include "logger/logger.h"
#include "projectManager/projectManager.h"

#include <dBus/dBus.h>
#include <memory>

namespace core
{
//--------------------------------------------------------------
class CoreManager
{
  public:
  CoreManager();                                                   // Default constructor
  virtual ~CoreManager();                                          // Default destructor
  CoreManager(const CoreManager &obj)                = delete;     // Copy constructor
  CoreManager(CoreManager &&obj) noexcept            = delete;     // Move constructor
  CoreManager &operator=(const CoreManager &obj)     = delete;     // Copy assignment operator
  CoreManager &operator=(CoreManager &&obj) noexcept = delete;     // Move assignment operator

  [[nodiscard]] dBus::Bus &getBus() const;     // Get a reference to the application bus

  protected:
  std::unique_ptr<dBus::Bus> m_bus;     // Application data bus

  std::unique_ptr<logger::Logger>                 m_logger;             // Application logger system
  std::unique_ptr<project::ProjectManager> m_projectManager;     // Requirement manager system

  private:
  void init();        // Initialize the core manager (e.g., set up the bus, etc.)
  void release();     // Release resources used by the core manager (e.g., clean up the bus, etc.)
};
//--------------------------------------------------------------
}     // namespace core
