#pragma once
#include <wx/wx.h>
#include <wx/listctrl.h>
#include <vector>
#include "canvas/CanvasState.h"

class LevelManagerDialog : public wxDialog {
public:
    LevelManagerDialog(wxWindow* parent, MC::CanvasState& state);
    // State is modified in-place. Caller refreshes canvas after ShowModal.

private:
    void Populate();
    void OnAdd(wxCommandEvent&);
    void OnRemove(wxCommandEvent&);
    void OnProperties(wxCommandEvent&);
    void OnChecked(wxListEvent&);
    void OnUnchecked(wxListEvent&);
    void OnSelChanged(wxListEvent&);
    void OnClose(wxCommandEvent&);

    wxListCtrl*       m_list    = nullptr;
    wxButton*         m_btnDel  = nullptr;
    MC::CanvasState&  m_state;
};
