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

#pragma once

#include <studio/undocommand.hpp>

#include <nostalgia/gfx/palette.hpp>

namespace nostalgia::gfx {

class AddColorCommand: public studio::UndoCommand {
	private:
		Palette &m_pal;
		Color16 m_color = 0;
		size_t const m_idx = 0;

	public:
		AddColorCommand(Palette &pal, Color16 color, size_t idx) noexcept;

		~AddColorCommand() noexcept override = default;

		[[nodiscard]]
		int commandId() const noexcept override;

		ox::Error redo() noexcept override;

		ox::Error undo() noexcept override;

};

}
