/*
 * Copyright 2023 - 2025 Gary Talent (gary@drinkingtea.net). All rights reserved.
 */

#pragma once

#include <ox/fs/fs.hpp>

#include <studio/undostack.hpp>

#include <jasper/world/world.hpp>

namespace jasper::world {

class AddObjectSet: public studio::UndoCommand {
	private:
		WorldDoc &m_doc;
		size_t m_insertIdx{};
		ox::String m_path;
	public:
		AddObjectSet(WorldDoc &doc, ox::UUID const &objSetUuid);
		ox::Error redo() noexcept override;
		ox::Error undo() noexcept override;
		[[nodiscard]]
		int commandId() const noexcept override;
};

class RmObjectSet: public studio::UndoCommand {
	private:
		WorldDoc &m_doc;
		size_t m_idx{};
		ObjectSetEntry m_entry;
	public:
		RmObjectSet(WorldDoc &doc, size_t idx);
		ox::Error redo() noexcept override;
		ox::Error undo() noexcept override;
		[[nodiscard]]
		int commandId() const noexcept override;
};

}
