using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Knot.Contracts.Messaging.Application.Abstractions;

public interface IMessageQueryService
{
    Task<List<MessageInfo>> GetAllMessagesAsync(CancellationToken cancellationToken);
    Task<List<MessageInfo>> GetOrphanedMessagesAsync(HashSet<Guid> activeChatIds, CancellationToken cancellationToken);
    Task DeleteMessagesAsync(List<Guid> messageIds, CancellationToken cancellationToken);
}

public record MessageInfo(Guid Id, Guid ChatId, bool IsDeleted, string? MediaUrl, List<MediaInfo>? Media);

public record MediaInfo(string Url);