#ifndef EDITSCENE_SKYBOX_HPP
#define EDITSCENE_SKYBOX_HPP
#pragma once

#include <Ogre.h>

/**
 * Skybox component - procedural sky rendered as a large cube
 * with a fragment shader that creates dynamic day/night/sunset
 * sky gradients.
 *
 * Designed to work alongside SunComponent on the same entity.
 * If no SunComponent is present, uses default noon lighting.
 */
struct SkyboxComponent {
	// Enable/disable skybox
	bool enabled = true;

	// Size of the skybox cube (default 500)
	float size = 500.0f;

	// Day sky colors
	Ogre::ColourValue dayTopColor = Ogre::ColourValue(0.2f, 0.5f, 1.0f);
	Ogre::ColourValue dayBottomColor = Ogre::ColourValue(0.6f, 0.8f, 1.0f);

	// Night sky colors
	Ogre::ColourValue nightTopColor = Ogre::ColourValue(0.0f, 0.0f, 0.05f);
	Ogre::ColourValue nightBottomColor = Ogre::ColourValue(0.05f, 0.05f, 0.15f);

	// Horizon glow colors
	Ogre::ColourValue sunriseColor = Ogre::ColourValue(1.0f, 0.5f, 0.2f);
	Ogre::ColourValue sunsetColor = Ogre::ColourValue(1.0f, 0.3f, 0.1f);

	// Angular size of sun/moon discs in the sky shader (0.01 - 0.2)
	float sunSize = 0.05f;
	float moonSize = 0.03f;

	// Enable simple stars at night
	bool starsEnabled = true;

	// Cloud coverage (0.0 = clear, 1.0 = overcast)
	// Not yet implemented in shader but reserved for future
	float cloudiness = 0.0f;

	// Runtime objects (managed by EditorSkyboxSystem)
	Ogre::SceneNode *sceneNode = nullptr;
	Ogre::ManualObject *manualObject = nullptr;

	// Dirty flag - triggers rebuild
	bool dirty = true;

	void markDirty()
	{
		dirty = true;
	}
};

#endif // EDITSCENE_SKYBOX_HPP
