using System.Collections.Generic;
using Dalamud.Game.Gui;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
namespace Dalamud.Plugin.Services;
///
/// This class handles interacting with the native chat UI.
///
public interface IChatGui
{
///
/// A delegate type used with the event.
///
/// The type of chat.
/// The sender ID.
/// The sender name.
/// The message sent.
/// A value indicating whether the message was handled or should be propagated.
public delegate void OnMessageDelegate(XivChatType type, uint senderId, ref SeString sender, ref SeString message, ref bool isHandled);
///
/// A delegate type used with the event.
///
/// The type of chat.
/// The sender ID.
/// The sender name.
/// The message sent.
/// A value indicating whether the message was handled or should be propagated.
public delegate void OnCheckMessageHandledDelegate(XivChatType type, uint senderId, ref SeString sender, ref SeString message, ref bool isHandled);
///
/// A delegate type used with the event.
///
/// The type of chat.
/// The sender ID.
/// The sender name.
/// The message sent.
public delegate void OnMessageHandledDelegate(XivChatType type, uint senderId, SeString sender, SeString message);
///
/// A delegate type used with the event.
///
/// The type of chat.
/// The sender ID.
/// The sender name.
/// The message sent.
public delegate void OnMessageUnhandledDelegate(XivChatType type, uint senderId, SeString sender, SeString message);
///
/// Event that will be fired when a chat message is sent to chat by the game.
///
public event OnMessageDelegate ChatMessage;
///
/// Event that allows you to stop messages from appearing in chat by setting the isHandled parameter to true.
///
public event OnCheckMessageHandledDelegate CheckMessageHandled;
///
/// Event that will be fired when a chat message is handled by Dalamud or a Plugin.
///
public event OnMessageHandledDelegate ChatMessageHandled;
///
/// Event that will be fired when a chat message is not handled by Dalamud or a Plugin.
///
public event OnMessageUnhandledDelegate ChatMessageUnhandled;
///
/// Gets the ID of the last linked item.
///
public int LastLinkedItemId { get; }
///
/// Gets the flags of the last linked item.
///
public byte LastLinkedItemFlags { get; }
///
/// Gets the dictionary of Dalamud Link Handlers.
///
public IReadOnlyDictionary<(string PluginName, uint CommandId), Action> RegisteredLinkHandlers { get; }
///
/// Queue a chat message. Dalamud will send queued messages on the next framework event.
///
/// A message to send.
public void Print(XivChatEntry chat);
///
/// Queue a chat message. Dalamud will send queued messages on the next framework event.
///
/// A message to send.
/// String to prepend message with "[messageTag] ".
/// Color to display the message tag with.
public void Print(string message, string? messageTag = null, ushort? tagColor = null);
///
/// Queue a chat message. Dalamud will send queued messages on the next framework event.
///
/// A message to send.
/// String to prepend message with "[messageTag] ".
/// Color to display the message tag with.
public void Print(SeString message, string? messageTag = null, ushort? tagColor = null);
///
/// Queue a chat message. Dalamud will send queued messages on the next framework event.
///
/// A message to send.
/// String to prepend message with "[messageTag] ".
/// Color to display the message tag with.
public void PrintError(string message, string? messageTag = null, ushort? tagColor = null);
///
/// Queue a chat message. Dalamud will send queued messages on the next framework event.
///
/// A message to send.
/// String to prepend message with "[messageTag] ".
/// Color to display the message tag with.
public void PrintError(SeString message, string? messageTag = null, ushort? tagColor = null);
}