#pragma once

#include "sdkexport.h"
#include "MotionType.h"
#include "RobTarget.h"
#include "Speeddata.h"
#include "Tooldata.h"
#include "Zonedata.h"
#include "Wobjdata.h"
#include "JointTarget.h"
#include <string>
#include <optional>

namespace mpl {

namespace sdk {
class TypeConversions;
}

class MPL_API MoveInstruction {
public:
    ~MoveInstruction();
    MoveInstruction(const MoveInstruction&) = default;
    MoveInstruction& operator=(const MoveInstruction&) = default;
    MoveInstruction(MoveInstruction&&) = default;
    MoveInstruction& operator=(MoveInstruction&&) = default;
    
    unsigned getId() const;

    std::string getName() const;

    MotionType getMotionType() const;

    RobTarget getRobTarget() const;
    RobTarget getCircle() const;
    JointTarget getJointTarget() const;

    Speeddata getSpeeddata() const;

    Zonedata getZonedata() const;

    Tooldata getTooldata() const;

    Wobjdata getWobjdata() const;

    // Get RobJoint from RobTarget or JointTarget
    std::optional<RobJoint> getRobJoint() const;

    std::string getComment() const;
    
    void setComment(const std::string& comment);

private:
    friend class sdk::TypeConversions;

    explicit MoveInstruction(void* impl);

    void* pimpl;
};

}
