#pragma once
#include <string>
#include "model/RocrailPlan.h"

namespace MC {

class PlanXmlWriter {
public:
    // Write plan to filePath (e.g. "C:/layouts/myLayout/plan.xml")
    // Returns true on success; sets lastError on failure.
    bool Write(const RocrailPlan& plan, const std::string& filePath);

    const std::string& LastError() const { return m_lastError; }

private:
    std::string m_lastError;
};

} // namespace MC
