#pragma once

#include "../../core/world/forward.h"
#include <memory>
#include <array>

namespace contouring::surrounding {
    typedef std::array<std::shared_ptr<const world::client::EdittableChunk>, 8> corners;
    const chunk_pos g_corner_offsets[8] = {
        chunk_pos(0, 0, 0),
        chunk_pos(0, 0, 1),
        chunk_pos(0, 1, 0),
        chunk_pos(0, 1, 1),
        chunk_pos(1, 0, 0),
        chunk_pos(1, 0, 1),
        chunk_pos(1, 1, 0),
        chunk_pos(1, 1, 1),
    };

    bool load(corners &out, const chunk_pos &chunkPos, const world::ChunkContainer &chunks);
    void load(corners &out, const glm::ucvec3 &areaSize, const glm::ucvec3 &chunkPos, const std::vector<std::shared_ptr<world::Chunk>> &area);
}
