#ifndef GOAP_GOAL_HPP
#define GOAP_GOAL_HPP

#include "actor_world_state.hpp"
#include <godot_cpp/classes/resource.hpp>

namespace gd = godot;

namespace goap {
class Goal : public gd::Resource {
    GDCLASS(Goal, gd::Resource);
    static void _bind_methods();
public:
    static gd::Ref<Goal> create(gd::StringName key, gd::Variant value);

    bool check_requirements_met(ActorWorldState *world_state);

    void set_requirements_dict(gd::Dictionary dict);
    gd::Dictionary get_requirements_dict() const;
    void set_desired_state_dict(gd::Dictionary dict);
    gd::Dictionary get_desired_state_dict() const;
public:
    //! Do not select this goal unless all requirements are met.
    WorldState requirements;
    //! The state to find a path to.
    WorldState desired_state;
};
}

#endif // !GOAP_GOAL_HPP
