#pragma once // Pure helpers: Bandai set-completion progress and per-set checklists. // Ownership keys on (set.id, normalized setNo). Never name-only. #include "ccm/domain/Enums.hpp" #include "ccm/domain/YuGiOhBandaiCard.hpp" #include "ccm/domain/YuGiOhBandaiSetCatalog.hpp" #include #include #include #include #include namespace ccm { struct YuGiOhBandaiSetCompletionProgress { std::string setId; std::string setName; std::size_t ownedUnique{0}; std::size_t total{0}; [[nodiscard]] int percent() const noexcept { if (total == 0) return 0; return static_cast((ownedUnique * 100) / total); } }; struct YuGiOhBandaiChecklistEntry { std::string setNo; std::string name; std::string rarity; bool owned{false}; }; [[nodiscard]] std::vector yuGiOhBandaiLanguagesInCollection(const std::vector& collection); [[nodiscard]] std::vector computeYuGiOhBandaiSetCompletion(const std::vector& collection, const YuGiOhBandaiSetCatalog& catalog, std::optional languageFilter = std::nullopt); [[nodiscard]] std::vector yuGiOhBandaiChecklistForSet(const std::vector& collection, const YuGiOhBandaiSetCatalog& catalog, std::string_view setId, std::optional languageFilter = std::nullopt); } // namespace ccm