using MediatR;

namespace MktXService.API.Application.Commands;

/// <summary>
/// EN: Command to send a message in a conversation.
/// VI: Command để gửi tin nhắn trong hội thoại.
/// </summary>
public record SendMessageCommand(
    Guid ConversationId,
    string Content,
    bool IsFromBot = false,
    List<string>? MediaUrls = null
) : IRequest<SendMessageResult>;

public record SendMessageResult(bool Success, Guid? MessageId, string? TwitterMessageId, string? Error);

/// <summary>
/// EN: Command to close a conversation.
/// VI: Command để đóng hội thoại.
/// </summary>
public record CloseConversationCommand(
    Guid ConversationId,
    string? Reason = null
) : IRequest<bool>;

/// <summary>
/// EN: Command to assign a conversation to an agent.
/// VI: Command để gán hội thoại cho agent.
/// </summary>
public record AssignConversationCommand(
    Guid ConversationId,
    Guid UserId
) : IRequest<bool>;

/// <summary>
/// EN: Command to reopen a closed conversation.
/// VI: Command để mở lại hội thoại đã đóng.
/// </summary>
public record ReopenConversationCommand(Guid ConversationId) : IRequest<bool>;

/// <summary>
/// EN: Command to mark conversation as pending.
/// VI: Command để đánh dấu hội thoại đang chờ.
/// </summary>
public record MarkConversationPendingCommand(Guid ConversationId) : IRequest<bool>;
