/* 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 SettingsCountButton; } // namespace style namespace Ui { class VerticalLayout; class SettingsButton; } // namespace Ui enum class Privacy { HasUsername, NoUsername, }; enum class UsernameState { Normal, TooMany, NotAvailable, }; class EditPeerTypeBox : public Ui::BoxContent { public: // Edit just the invite link. EditPeerTypeBox(QWidget*, not_null peer); EditPeerTypeBox( QWidget*, not_null peer, bool useLocationPhrases, std::optional> savedCallback, std::optional privacySaved, std::optional usernameSaved, std::optional> usernameError = {}); protected: void prepare() override; void setInnerFocus() override; private: not_null _peer; bool _useLocationPhrases = false; std::optional> _savedCallback; std::optional _privacySavedValue; std::optional _usernameSavedValue; std::optional> _usernameError; rpl::event_stream<> _focusRequests; };