#pragma once

#include <ptvc/scene/Component.h>

#include <glm/glm.hpp>

namespace CodeDrawPTVC {

    class LightComponent : public Component
    {
    public:
        glm::vec3 Color{1.0f, 1.0f, 1.0f};
        float Intensity = 1.0f;
    };

    class DirectionalLightComponent final : public LightComponent
    {
    public:
        glm::vec3 Direction() const
        {
            return TransformRef().Forward();
        }
    };

    class PointLightComponent final : public LightComponent
    {
    public:
        float Range = 5.0f;

        // Point-shadow state is still driven by the game renderer for now.
        // The component owns the light data and the colocated shaders own the cubemap depth pass.
        bool CastsShadow = false;

        glm::vec3 Position() const
        {
            return TransformRef().WorldPosition();
        }
    };

}
