/* 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 template class object_ptr; class PeerData; namespace Api { struct InviteLink; } // namespace Api namespace Main { class Session; } // namespace Main namespace Ui { class VerticalLayout; class Show; class BoxContent; } // namespace Ui [[nodiscard]] bool IsExpiredLink(const Api::InviteLink &data, TimeId now); void AddSinglePeerRow( not_null container, not_null peer, rpl::producer status); void AddPermanentLinkBlock( std::shared_ptr show, not_null container, not_null peer, not_null admin, rpl::producer fromList); void CopyInviteLink(std::shared_ptr show, const QString &link); [[nodiscard]] object_ptr ShareInviteLinkBox( not_null peer, const QString &link, const QString &copied = {}); [[nodiscard]] object_ptr ShareInviteLinkBox( not_null session, const QString &link, const QString &copied = {}); [[nodiscard]] object_ptr InviteLinkQrBox( const QString &link, rpl::producer title, rpl::producer about); [[nodiscard]] object_ptr RevokeLinkBox( not_null peer, not_null admin, const QString &link, bool permanent = false); [[nodiscard]] object_ptr EditLinkBox( not_null peer, const Api::InviteLink &data); [[nodiscard]] object_ptr DeleteLinkBox( not_null peer, not_null admin, const QString &link); [[nodiscard]] object_ptr ShowInviteLinkBox( not_null peer, const Api::InviteLink &link); [[nodiscard]] QString PrepareRequestedRowStatus(TimeId date);