#pragma once

#include "../CommandHistory.h"
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/sdf/path.h>
#include <pxr/usd/sdf/reference.h>
#include <string>

namespace UsdLayerManager {

/// Wraps adding an Xform prim + reference (stage-level "Add Reference..." action).
class AddReferenceCommand : public ICommand {
public:
    AddReferenceCommand(pxr::UsdStageRefPtr   stage,
                        const pxr::SdfPath&   xformPath,
                        const std::string&    refFilePath);

    void Execute() override;
    void Undo()    override;
    std::string GetDescription() const override { return m_description; }

private:
    pxr::UsdStageRefPtr m_stage;
    pxr::SdfPath        m_xformPath;
    std::string         m_refFilePath;
    std::string         m_description;
};

} // namespace UsdLayerManager
