Files
AyuGramDesktop/Telegram/SourceFiles/boxes/compose_ai_box.h
T
2026-03-31 14:26:57 +07:00

40 lines
1.0 KiB
C++

/*
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 "api/api_common.h"
#include "base/object_ptr.h"
#include "ui/text/text_entity.h"
namespace Main {
class Session;
} // namespace Main
namespace Ui {
class ChatStyle;
class GenericBox;
class RpWidget;
class Show;
} // namespace Ui
namespace HistoryView::Controls {
struct ComposeAiBoxArgs {
not_null<Main::Session*> session;
TextWithEntities text;
std::shared_ptr<Ui::ChatStyle> chatStyle;
Fn<void(TextWithEntities)> apply;
Fn<void(TextWithEntities, Api::SendOptions, Fn<void()>)> send;
Fn<void(not_null<Ui::RpWidget*>, Fn<void(Api::SendOptions)>)> setupMenu;
};
void ComposeAiBox(not_null<Ui::GenericBox*> box, ComposeAiBoxArgs &&args);
void ShowComposeAiBox(std::shared_ptr<Ui::Show> show, ComposeAiBoxArgs &&args);
} // namespace HistoryView::Controls