#pragma once
#include <string>
#include <vector>
#include "canvas/CanvasState.h"
#include "model/PlacedPiece.h"

namespace TD {

class LayoutXml {
public:
    static std::string Save(const MC::CanvasState& state,
                            const std::string& filePath,
                            const std::string& layoutName);

    static std::string Load(MC::CanvasState& state,
                            const std::string& filePath,
                            std::string& layoutNameOut);

    static std::string SaveBlock(const MC::CanvasState& state,
                                 const std::string& filePath,
                                 const std::string& blockName);

    static std::string LoadBlock(const std::string& filePath,
                                 std::string& blockNameOut,
                                 std::vector<MC::PlacedPiece>& piecesOut);
};

} // namespace TD
