/* 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 "mtproto/sender.h" namespace Api { struct GiftCode; } // namespace Api namespace Data { struct Boost; struct CreditsHistoryEntry; struct GiveawayStart; struct GiveawayResults; struct SubscriptionEntry; } // namespace Data namespace Ui { class GenericBox; class VerticalLayout; } // namespace Ui namespace Window { class SessionNavigation; } // namespace Window [[nodiscard]] rpl::producer GiftDurationValue(int months); [[nodiscard]] QString GiftDuration(int months); void GiftCodeBox( not_null box, not_null controller, const QString &slug); void GiftCodePendingBox( not_null box, not_null controller, const Api::GiftCode &data); void ResolveGiftCode( not_null controller, const QString &slug, PeerId fromId = 0, PeerId toId = 0); void ResolveGiveawayInfo( not_null controller, not_null peer, MsgId messageId, std::optional start, std::optional results); void AddStarGiftTable( not_null controller, not_null container, const Data::CreditsHistoryEntry &entry, Fn convertToStars); void AddCreditsHistoryEntryTable( not_null controller, not_null container, const Data::CreditsHistoryEntry &entry); void AddSubscriptionEntryTable( not_null controller, not_null container, const Data::SubscriptionEntry &s); void AddSubscriberEntryTable( not_null controller, not_null container, not_null peer, TimeId date); void AddCreditsBoostTable( not_null controller, not_null container, const Data::Boost &boost);