#pragma once

#include <cstdint>
#include <string>
#include <vector>

#include <fesa/core/diagnostic.hpp>
#include <fesa/io/abaqus/deck_record.hpp>

namespace fesa {

enum class ResolvedSetScope { global, part, assembly };

enum class ResolvedSetKind { node, element };

struct ResolvedSet final {
    std::string scope_name;
    std::string set_name;
    std::vector<std::int64_t> sorted_unique_labels;
    ResolvedSetScope scope = ResolvedSetScope::global;
    ResolvedSetKind kind = ResolvedSetKind::node;
};

struct SetResolutionResult final {
    std::vector<ResolvedSet> sets;
    std::vector<Diagnostic> diagnostics;
};

[[nodiscard]] SetResolutionResult resolve_sets(const ParsedDeck& deck);

}  // namespace fesa
