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

namespace Knot.Modules.Messaging.Application.Abstractions;

public record UserStats(int MessageCount, long StorageSize);

public interface IUserStatsService
{
    Task<Dictionary<Guid, UserStats>> GetStatsForUsersAsync(IEnumerable<Guid> userIds, CancellationToken ct = default);
    Task<long> GetTotalStorageSizeAsync(CancellationToken ct = default);
    Task<int> GetCountOrphanedMessagesAsync(HashSet<Guid> activeChatIds, CancellationToken ct = default);
    Task<long> GetOrphanedMediaSizeAsync(HashSet<string> validFileIds, CancellationToken ct = default);
}
