#pragma once

#include "RuntimeJson.h"

#include <string>

namespace RenderCadenceCompositor
{
enum class RuntimeControlCommandType
{
	AddLayer,
	RemoveLayer,
	ReorderLayer,
	SetLayerBypass,
	SetLayerShader,
	UpdateLayerParameter,
	ResetLayerParameters,
	ReloadShaders,
	Unsupported
};

struct RuntimeControlCommand
{
	RuntimeControlCommandType type = RuntimeControlCommandType::Unsupported;
	std::string layerId;
	std::string shaderId;
	std::string parameterId;
	int targetIndex = 0;
	bool bypass = false;
	JsonValue value;
};

bool ParseRuntimeControlCommand(
	const std::string& path,
	const std::string& body,
	RuntimeControlCommand& command,
	std::string& error);
}
