/* 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 #include "boxes/abstract_box.h" namespace style { struct SettingsCountButton; } // namespace style namespace Window { class SessionNavigation; } // namespace Window namespace Ui { class VerticalLayout; class SettingsButton; } // namespace Ui void AutoDeleteSettingsBox( not_null box, TimeId ttlPeriod, Fn callback); class EditPeerInfoBox : public Ui::BoxContent { public: EditPeerInfoBox( QWidget*, not_null navigation, not_null peer); void setInnerFocus() override { _focusRequests.fire({}); } static bool Available(not_null peer); [[nodiscard]] static object_ptr CreateButton( not_null parent, rpl::producer &&text, rpl::producer &&count, Fn callback, const style::SettingsCountButton &st, const style::icon *icon = nullptr); protected: void prepare() override; private: rpl::event_stream<> _focusRequests; not_null _navigation; not_null _peer; };