#pragma once // Spec: INV-posts 3.4. HStack(spacing 12){ VoteView, ReactionsBar, Spacer, HStack(spacing 24){ reply, report, // edit, delete } }. Edit and delete exist only when their callbacks are given (own posts). #include #include #include #include "model/Reactions.hpp" #include "model/Vote.hpp" #include "ui/Views.hpp" namespace dp { struct PostFooterProps { std::string targetId; std::string authorId; std::int64_t starCount = 0; Vote currentVote; Reactions reactions; std::function onReact; std::function onReply; // empty = no reply button bool isReplying = false; std::function onEdit; std::function onDelete; }; ui::ViewPtr PostFooterView(const PostFooterProps& props); // Presents the "Delete this ...?" confirmation with Delete (destructive) and Cancel. void presentDeleteConfirmation(const std::string& question, std::function onDelete); } // namespace dp