#pragma once // Spec: INV-posts 7.4. Chips sorted by count (desc) then emoji (asc), truncated with a "..." chip that opens a popover. #include #include #include #include "model/Reactions.hpp" #include "ui/Views.hpp" namespace dp { struct ReactionItem { std::string emoji; std::int64_t count = 0; bool isMine = false; }; class ReactionsStack { public: // Sorted items (count descending, emoji ascending by code unit order), capped at PostsLimits::kMaxReactionChips. static std::vector items(const Reactions& reactions); // nullptr (dropped by stacks) when there are no reactions. static ui::ViewPtr view(const Reactions& reactions, std::function onSelect); }; } // namespace dp