/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include "base/object_ptr.h" #include "calls/group/ui/calls_group_stars_coloring.h" namespace style { struct RoundCheckbox; struct MediaSlider; } // namespace style namespace Main { class Session; } // namespace Main namespace Ui::Premium { class BubbleWidget; } // namespace Ui::Premium namespace Ui { class AbstractButton; class BoxContent; class GenericBox; class DynamicImage; class VerticalLayout; struct PaidReactionTop { QString name; std::shared_ptr photo; uint64 barePeerId = 0; int count = 0; Fn click; bool my = false; }; struct PaidReactionBoxArgs { int min = 0; int explicitlyAllowed = 0; int chosen = 0; int max = 0; std::vector top; not_null session; QString name; Fn(rpl::producer amount)> submit; std::vector colorings; rpl::producer balanceValue; Fn send; bool videoStreamChoosing = false; bool videoStreamSending = false; bool videoStreamAdmin = false; bool dark = false; }; void PaidReactionsBox( not_null box, PaidReactionBoxArgs &&args); [[nodiscard]] object_ptr MakePaidReactionBox( PaidReactionBoxArgs &&args); [[nodiscard]] int MaxTopPaidDonorsShown(); [[nodiscard]] QImage GenerateSmallBadgeImage( QString text, const style::icon &icon, QColor bg, QColor fg, const style::RoundCheckbox *borderSt = nullptr); struct StarSelectDiscreter { Fn ratioToValue; Fn valueToRatio; }; [[nodiscard]] StarSelectDiscreter StarSelectDiscreterForMax(int max); void PaidReactionSlider( not_null container, const style::MediaSlider &st, int min, int explicitlyAllowed, rpl::producer current, int max, Fn changed, Fn activeFgOverride = nullptr); void AddStarSelectBalance( not_null box, not_null session, rpl::producer balanceValue, bool dark = false); not_null AddStarSelectBubble( not_null container, rpl::producer<> showFinishes, rpl::producer value, int max, Fn activeFgOverride = nullptr); struct StarSelectInfoBlock { rpl::producer title; rpl::producer subtext; Fn click; }; [[nodiscard]] object_ptr MakeStarSelectInfoBlocks( not_null parent, std::vector blocks, Text::MarkedContext context, bool dark = false); } // namespace Ui