/* 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 "base/object_ptr.h" #include "base/unique_qptr.h" #include "ui/layers/generic_box.h" namespace style { struct FlatLabel; } // namespace style namespace Ui { class DropdownMenu; class GenericBox; class BoxContent; } // namespace Ui namespace Ui::Menu { class ItemBase; class Menu; } // namespace Ui::Menu namespace Calls { class GroupCall; } // namespace Calls namespace Calls::Group { enum class BoxContext { GroupCallPanel, MainWindow, }; void LeaveBox( not_null box, not_null call, bool discardChecked, BoxContext context); struct ConfirmBoxArgs { TextWithEntities text; rpl::producer button; Fn callback; const style::FlatLabel *st = nullptr; Fn filter; }; void ConfirmBoxBuilder(not_null box, ConfirmBoxArgs &&args); inline auto ConfirmBox(ConfirmBoxArgs &&args) { return Box(ConfirmBoxBuilder, std::move(args)); } void FillMenu( not_null menu, not_null peer, not_null call, bool wide, Fn chooseJoinAs, Fn chooseShareScreenSource, Fn)> showBox); [[nodiscard]] base::unique_qptr MakeAttentionAction( not_null menu, const QString &text, Fn callback); } // namespace Calls::Group