#pragma once

#include <godot_cpp/classes/node.hpp>
#include <godot_cpp/variant/dictionary.hpp>
#include <godot_cpp/variant/typed_array.hpp>

namespace godot {

/* One-shot facade over the pure C generator. Call generate() with a seed and
   depth; receive a Dictionary describing the final dungeon. See the plugin
   README for the full dict shape (terrain / liquid / surface / flags arrays,
   rooms[], machines[], chokepoints[], stairs). */
class BrogueGen : public Node {
    GDCLASS(BrogueGen, Node)

protected:
    static void _bind_methods();

public:
    BrogueGen();
    ~BrogueGen();

    Dictionary generate(int seed, int depth);

    /* v2 API: 3D blobber dungeon. Returns a Dictionary with raw cell data +
       per-material mesh surfaces. See dungeon_to_dict.h for the schema. */
    Dictionary generate_dungeon(int seed, int num_levels, int depth);

    /* Exporter bridge: returns an Array of per-level Dictionaries shaped like
       the 2D generate() output ({width, height, terrain, liquid}), derived
       from a blobber 3D dungeon. Lets the .map exporter consume either
       generator uniformly. */
    TypedArray<Dictionary> generate_2d_slices(int seed, int num_levels, int depth);
};

} // namespace godot
