/*
 * 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/worldobject.hpp>

namespace jasper::world {

class RmObject: public studio::UndoCommand {
	private:
		WorldObjectSet &m_doc;
		size_t const m_rmIdx{};
		WorldObject m_obj{};
	public:
		RmObject(WorldObjectSet &doc, size_t rmIdx) noexcept;
		ox::Error redo() noexcept override;
		ox::Error undo() noexcept override;
		[[nodiscard]]
		int commandId() const noexcept override;
};

}
