#pragma once
#include <wx/frame.h>
#include <wx/webview.h>
#include <vector>
#include <utility>

struct SimPoint {
    double lat;
    double lon;
};

class MapSimFrame : public wxFrame {
public:
    MapSimFrame(wxWindow* parent, double centerLat = 53.3, double centerLon = 10.39, const std::vector<std::pair<double, double>>& zoneCoords = {});
    void AddSimPoint(double lat, double lon);
    void StartSimulation();
private:
    wxWebView* m_webView;
    std::vector<SimPoint> m_route;
    std::vector<std::pair<double, double>> m_zoneCoords;
    void OnWebViewEvent(wxWebViewEvent& event);
    void OnPlay(wxCommandEvent& event);
    void SendPositionToEngine(double lat, double lon);
    wxDECLARE_EVENT_TABLE();
};
