#include "../Game.hpp"
#include "LiveEngineDialog.hpp"
#include "editor/EditorCanvas.hpp"
#include "ochess.hpp"
#include <wx/listctrl.h>
#include <wx/notebook.h>

// Local events
wxDECLARE_EVENT(GOTO_MOVE_EVENT, wxCommandEvent);
wxDECLARE_EVENT(DELETE_MOVE_EVENT, wxCommandEvent);
wxDECLARE_EVENT(PROMOTE_MOVE_EVENT, wxCommandEvent);
wxDECLARE_EVENT(SET_AS_MAINLINE_EVENT, wxCommandEvent);
wxDECLARE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);

// Foreign events
wxDECLARE_EVENT(GAME_CHANGE, wxCommandEvent);

class GameTabRightPanel : public TabGameRightPanel {
  std::shared_ptr<Game> game;
  EditorCanvas *editor_canvas;
  long selected_item;
  LiveEngineDialog *live_engine;

public:
  GameTabRightPanel(wxFrame *parent, std::shared_ptr<Game> game);
  void Notify();
  void OnCommentChange(wxCommandEvent &event);
  void RefreshTagsList();
  void OnTagSelected(wxListEvent &event);
  void OnTagDeselected(wxListEvent &event);
  void OnApply(wxCommandEvent &event);
  void OnDelete(wxCommandEvent &event);
  void OnLiveAnalysis(wxCommandEvent &event);
  void ApplyPreferences();
  void OnLiveEngineClose(wxCloseEvent &e);
  std::string GetNagFromStr(std::string str);
};