#ifndef MAP_PAN_TOOL_HPP_
#define MAP_PAN_TOOL_HPP_

#include <MapTool/MapTool.hpp>
#include <Widget/MapView/MapView.hpp>

/**
 * @brief The panning tool, which lets you drag around the map to change the view.
 */
class MapPanTool final : public MapTool
{
private:
    bool dragging = false;
    glm::ivec2 mouseAnchor;
    glm::ivec2 cameraAnchor;

public:
    static MapPanTool instance;

    virtual Material& getIcon() override;
    virtual std::string getName() override;
    virtual void onMouseDown(MapView &mapView, Uint8 button, glm::ivec2 pos) override;
    virtual void onMouseUp(MapView &mapView, Uint8 button, glm::ivec2 pos) override;
    virtual void onMouseMoved(MapView &mapView, glm::ivec2 pos) override;
    virtual IEquipment::MapLevel getRequiredMapLevel() override;
};

#endif