/* 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 "ui/widgets/buttons.h" namespace Ui { class DynamicImage; class GenericBox; class VerticalLayout; } // namespace Ui namespace UrlAuthBox { struct Result { bool auth : 1 = false; bool allowWrite : 1 = false; bool sharePhone : 1 = false; QString matchCode; }; class SwitchableUserpicButton final : public Ui::RippleButton { public: SwitchableUserpicButton( not_null parent, int size); void setExpanded(bool expanded); void setUserpic(not_null); private: void paintEvent(QPaintEvent *e) override; QImage prepareRippleMask() const override; QPoint prepareRippleStartPosition() const override; const int _size; const int _userpicSize; const int _skip; bool _expanded = false; Ui::RpWidget *_userpic = nullptr; }; void AddAuthInfoRow( not_null container, const QString &topText, const QString &bottomText, const QString &leftText, const style::icon &icon); void ShowMatchCodesBox( not_null box, Fn(QString)> emojiImageFactory, const QString &domain, const QStringList &codes, Fn callback, bool isApp = false); void Show( not_null box, const QString &url, const QString &domain, const QString &selfName, const QString &botName, Fn callback); void ShowDetails( not_null box, const QString &url, const QString &domain, Fn(QString)> emojiImageFactory, Fn callback, object_ptr userpicOwned, rpl::producer botName, const QString &browser, const QString &platform, const QString &ip, const QString ®ion, rpl::producer matchCodes = rpl::single(QStringList()), bool isApp = false); } // namespace UrlAuthBox