// D:\Dev\Mosis\MosisService\designer\src\testing\visual_capture.h
#pragma once

#include <string>
#include <vector>
#include <cstdint>

namespace mosis::testing {

class VisualCapture {
public:
    VisualCapture(int width, int height);
    ~VisualCapture() = default;

    // Capture current framebuffer to PNG
    bool CaptureScreenshot(const std::string& path);

    // Capture to memory buffer (RGBA)
    std::vector<uint8_t> CaptureToBuffer();

    // Compare two screenshots, return difference percentage (0.0 = identical, 1.0 = completely different)
    static float CompareImages(const std::string& path1, const std::string& path2);

    // Set capture dimensions (if different from construction)
    void SetDimensions(int width, int height) { m_width = width; m_height = height; }

private:
    int m_width;
    int m_height;
};

} // namespace mosis::testing
