#pragma once
#include "gfx/dag_types.h"
#include <vector>

namespace fn::gfx {

// Active catalog (built-in nodes + any user-registered ones).
const std::vector<DagNodeDef>& dag_catalog();

// Look up a node by name. Returns nullptr if not present.
const DagNodeDef* dag_find(const std::string& name);

// Add (or replace) a user-defined node. Returns false if `def.name` collides
// with a built-in. Replacing an existing user node by same name is allowed.
// Always sets def.is_builtin = false on the stored copy.
bool dag_register_node(DagNodeDef def);

// Remove a user-defined node by name. Returns true if removed.
// Built-in nodes cannot be removed.
bool dag_unregister_node(const std::string& name);

} // namespace fn::gfx
