// SPDX-FileCopyrightText: 2025 Prayag Jain <prayagjain2@gmail.com>
//
// SPDX-License-Identifier: GPL-3.0-or-later

#pragma once
#include "drawingtool.hpp"
#include "libdrawywidgets_private_export.h"
class FreeformItem;

class LIBDRAWYWIDGETS_TESTS_EXPORT FreeformTool : public DrawingTool
{
public:
    explicit FreeformTool(ApplicationContext *context);
    ~FreeformTool() override = default;

    [[nodiscard]] QString icon() const override;

    void mousePressed(ApplicationContext *context) override;
    void mouseMoved(ApplicationContext *context) override;
    void mouseReleased(ApplicationContext *context) override;
    void tablet(ApplicationContext *context) override;
    void cleanup() override;

    [[nodiscard]] Tool::Type type() const override;

private:
    std::shared_ptr<FreeformItem> m_currentItem{};
    QList<std::shared_ptr<Item>> m_itemList{};

    QPixmap m_currentCache{};
    QPointF m_lastPoint{};
};
