#pragma once

#include "gui/wxNode.h"

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

namespace gui
{
class RequirementDetailPanel;
class RequirementListPanel;

//--------------------------------------------------------------
class RequirementsPanel : public wxPanel
  , public dBus::wxNode
{
  public:
  RequirementsPanel()                                            = delete;      // Default constructor
  virtual ~RequirementsPanel()                                   = default;     // Default destructor
  RequirementsPanel(const RequirementsPanel &obj)                = delete;      // Copy constructor
  RequirementsPanel(RequirementsPanel &&obj) noexcept            = delete;      // Move constructor
  RequirementsPanel &operator=(const RequirementsPanel &obj)     = delete;      // Copy assignment operator
  RequirementsPanel &operator=(RequirementsPanel &&obj) noexcept = delete;      // Move assignment operator

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

  protected:
  // Controls
  RequirementListPanel   *m_requirementListPanel   = nullptr;     // Pointer to the requirement list panel control
  RequirementDetailPanel *m_requirementDetailPanel = nullptr;     // Pointer to the requirement detail panel control

  private:
  void createControls();     // Creating controls

  // Events
  void on_receiveMessageFromBus(MessageID messageID, MessagePtr message) override;     // dBus message reception handler
};
//--------------------------------------------------------------
}     // namespace gui

/*
┌─────────────────────────────────────────────┐
│ ▼ Métadonnées                               │
│   ID:          [REQ-001]          🔒        │
│   UUID:        [abc-123-def]      🔒        │
│   Auteur:      [John Doe]         🔒        │
│   Créé le:     [2026-03-13 14:30] 🔒        │
│   Modifié le:  [2026-03-13 15:45] 🔒        │
├─────────────────────────────────────────────┤
│ ▼ Détails                                   │
│   Nom:         [________________]           │
│   Description: [                ]           │
│                [                ]           │
│                [________________]           │
│   Critères:    [                ]           │
│                [________________]           │
│   □ SMART                                   │
├─────────────────────────────────────────────┤
│ ▼ Classification                            │
│   Type:        [Functional      ▼]          │
│   Catégorie:   [Backend         ▼]          │
│   Priorité:    ● ● ● ○ ○ (3/5)              │
│   Statut:      ○ Draft  ○ Review            │
│                ● Approved  ○ Rejected       │
├─────────────────────────────────────────────┤
│              [Enregistrer] [Annuler]        │
└─────────────────────────────────────────────┘
 */