#pragma once

#include "Component.h" // Base class definition
#include <string>



class TextComponent : public Component {
public:
    TextComponent(Object* owner); 
    TextComponent(Object* owner, std::string initialText); 

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

    const std::string& GetText() const;
    void SetText(const std::string& newText);
    void SetText(std::string&& newText);

private:
    std::string text; 
};