/* 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 "boxes/abstract_box.h" #include "base/timer.h" enum LangKey : int; namespace style { struct InfoProfileCountButton; } // namespace style namespace Ui { class VerticalLayout; } // namespace Ui namespace Info { namespace Profile { class Button; } // namespace Profile } // namespace Info enum class Privacy { Public, Private, }; enum class UsernameState { Normal, TooMany, NotAvailable, }; class EditPeerTypeBox : public BoxContent { public: EditPeerTypeBox( QWidget*, not_null p, FnMut savedCallback, std::optional privacySaved = std::nullopt, std::optional usernameSaved = std::nullopt, std::optional usernameError = std::nullopt); protected: void prepare() override; void setInnerFocus() override; private: not_null _peer; FnMut _savedCallback; std::optional _privacySavedValue; std::optional _usernameSavedValue; std::optional _usernameError; rpl::event_stream<> _focusRequests; };