#pragma once
#include "Component.h"
#include <glm/glm.hpp>
#include <yaml-cpp/yaml.h>



class LightComponent : public Component
{
public:

    

    LightComponent(Object* owner);

    std::string GetName() const override { return "LightComponent"; }

    void Save(YAML::Emitter& out) const override;
    void Load(const YAML::Node& node) override;

    void SetColor(const glm::vec3& color) { m_Color = color; }
    void SetIntensity(float intensity) { m_Intensity = intensity; }
    void SetRadius(float radius) { m_Radius = radius; }
    void SetFalloff(float falloff) { m_Falloff = falloff; }
    void SetType(int type) { m_type = type; }


    glm::vec3 GetColor() const { return m_Color; }
    float GetIntensity() const { return m_Intensity; }
    float GetRadius() const { return m_Radius; }
    float GetFalloff() const { return m_Falloff; }
    int GetType() const { return m_type; }


private:
    glm::vec3 m_Color {1.0f, 1.0f, 1.0f};
    float m_Intensity = 1.0f;
    float m_Radius = 300.0f;
    float m_Falloff = 1.0f;
    int m_type = 0;
};
