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

#pragma once

#include <studio/undostack.hpp>
#include <nostalgia/gfx/tilesheet.hpp>

namespace nostalgia::gfx {

// Command IDs to use with QUndoCommand::id()
enum class CommandId {
	Draw = 1,
	AddSubSheet,
	RmSubSheet,
	DeleteTile,
	FlipX,
	FlipY,
	Rotate,
	InsertTile,
	MoveSubSheet,
	UpdateSubSheet,
	Cut,
	Paste,
	PaletteChange,
};

constexpr bool operator==(CommandId c, int i) noexcept {
	return static_cast<int>(c) == i;
}

constexpr bool operator==(int i, CommandId c) noexcept {
	return static_cast<int>(c) == i;
}

class TileSheetCommand: public studio::UndoCommand {
	public:
		[[nodiscard]]
		virtual TileSheet::SubSheetIdx const &subsheetIdx() const noexcept = 0;
};

}