#ifndef JSON_HANDLER_H
#define JSON_HANDLER_H

#pragma once
#include "libs/robot/robot_defs.h"
#include "libs/util/logger.h"
#include "libs/tcpc/tcpc_defs.h"
#include "libs/camera/camera.h"
#include "libs/robot/staubli.h"

#include <QFileDialog>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QMessageBox>

class json_handler
{
public:
    json_handler(QObject *parent = nullptr);

    ~json_handler();

    bool loadTCP(ri::Point& outputPoint, ri::eRobot_TOOL& outputTOOL);

    void saveTCP(ri::Point inputPoint, ri::eRobot_TOOL inputTOOL);

    void loadJSON(tcpc::sParameters& parameters, tcpc::sCAM_Parameters& front_camera, tcpc::sCAM_Parameters& side_camera);

    void saveJSON(tcpc::sParameters parameters, tcpc::sCAM_Parameters front_camera, tcpc::sCAM_Parameters side_camera);

private:
    Logger log;
};

#endif // JSON_HANDLER_H
