#pragma once

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

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

  explicit RequirementDetailPanel(wxWindow *parentWindow, dBus::Bus &bus);     // Constructor

  protected:
  dBus::Bus &m_bus;     // Reference to the application bus
  std::vector<wxControl *> m_titleControls;     // Titles controls for each section (metadata, details, classification)

  private:
  void     createControls();                                   // Creating controls
  wxSizer *createControls_metadata(wxWindow *owner);           // Creating controls for requirement metadata
  wxSizer *createControls_details(wxWindow *owner);            // Creating controls for requirement details
  wxSizer *createControls_classification(wxWindow *owner);     // Creating controls for requirement classification

  wxStaticText *createTitle(wxWindow *owner, const wxString &title); // Helper function to create a section title control
  void          updateTitleSizes() const;                            // Harmonize the sizes of the title controls to ensure they have the same width
};
//--------------------------------------------------------------
}     // namespace gui
