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

#pragma once

#include <turbine/turbine.hpp>

#include "commands/modifytiles.hpp"

namespace jasper::world {

class TileClipboard : public turbine::ClipboardObject<TileClipboard> {
	public:
		static constexpr auto TypeName = "net.drinkingtea.jasper.world.studio.TileClipboard";
		static constexpr auto TypeVersion = 1;

	protected:
		ox::UUID m_assetId;
		ox::Size m_selSz;
		ox::Vector<ModifyTilesCommand::Mod> m_tileMods;

	public:
		TileClipboard(ox::UUID const &assetId, ox::Size selSz) noexcept;

		[[nodiscard]]
		ox::Size selectionSize() const noexcept;

		void addTile(ModifyTilesCommand::Mod const &mod) noexcept;

		[[nodiscard]]
		ox::SpanView<ModifyTilesCommand::Mod> tiles() const noexcept;

		constexpr ox::UUID const &assetId() const noexcept {
			return m_assetId;
		}
};

OX_MODEL_BEGIN(TileClipboard)
OX_MODEL_END()

}
