#pragma once

#include <string>
#include <memory>
#include <vector>
#include <yaml-cpp/yaml.h>
#include "../core/utils/ExceptionHandler.h"
#include "../core/utils/AssetManager.h"
#include "../core/utils/Logging.h"


class Object;

class Component {
public:
    Component(Object* owner) : owner(owner) {}
    virtual ~Component() = default;

    Object* GetOwner() const { return owner; }
    void SetOwner(Object* o) { owner = o; }

    virtual std::string GetName() const = 0;
    

    virtual void Save(YAML::Emitter& out) const = 0;
    virtual void Load(const YAML::Node& node) = 0;

protected:
    Object* owner;

};
