#pragma once

#include "../control/http/HttpControlServer.h"
#include "../logging/Logger.h"
#include "../preview/PreviewConfig.h"
#include "../telemetry/TelemetryHealthMonitor.h"
#include "DeckLinkOutput.h"
#include "VideoOutputThread.h"

#include <chrono>
#include <cstddef>
#include <string>

namespace RenderCadenceCompositor
{
struct AppConfig
{
	DeckLinkOutputConfig deckLink;
	VideoOutputThreadConfig outputThread;
	TelemetryHealthMonitorConfig telemetry;
	LoggerConfig logging;
	HttpControlServerConfig http;
	std::string shaderLibrary = "shaders";
	std::string oscBindAddress = "0.0.0.0";
	unsigned short oscPort = 9000;
	double oscSmoothing = 0.18;
	std::string inputVideoFormat = "1080p";
	std::string inputFrameRate = "59.94";
	std::string outputVideoFormat = "1080p";
	std::string outputFrameRate = "59.94";
	bool autoReload = true;
	std::size_t maxTemporalHistoryFrames = 12;
	bool previewEnabled = false;
	double previewFps = kDefaultPreviewFps;
	std::size_t warmupCompletedFrames = 4;
	std::chrono::milliseconds warmupTimeout = std::chrono::seconds(3);
	std::chrono::milliseconds prerollTimeout = std::chrono::seconds(3);
	std::chrono::milliseconds prerollPoll = std::chrono::milliseconds(2);
	std::string runtimeShaderId = "happy-accident";
};

AppConfig DefaultAppConfig();
}
