/* 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" 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, std::optional> savedCallback = {}, std::optional privacySaved = {}, std::optional usernameSaved = {}, std::optional> usernameError = {}); protected: void prepare() override; void setInnerFocus() override; private: not_null _peer; std::optional> _savedCallback; std::optional _privacySavedValue; std::optional _usernameSavedValue; std::optional> _usernameError; rpl::event_stream<> _focusRequests; };