using Knot.Contracts.Conversations.Domain;

namespace Knot.Contracts.Conversations.Domain;

public interface IChatRepository
{
    void Add(Chat chat);
    void Update(Chat chat);
    void Remove(Chat chat);
    Task<Chat?> GetByIdAsync(Guid id, CancellationToken cancellationToken);
    Task<Chat?> GetFavoritesAsync(Guid userId, CancellationToken cancellationToken);
    Task<List<Chat>> GetUserChatsAsync(Guid userId, CancellationToken cancellationToken);
}

public interface IFolderRepository
{
    void Add(Folder folder);
    void Update(Folder folder);
    void Remove(Folder folder);
    Task<Folder?> GetByIdAsync(Guid id, CancellationToken cancellationToken);
    Task<List<Folder>> GetUserFoldersAsync(Guid userId, CancellationToken cancellationToken);
}

public interface IUserChatSettingsRepository
{
    void Add(UserChatSettings settings);
    void Update(UserChatSettings settings);
    void Remove(UserChatSettings settings);
    void RemoveRange(IEnumerable<UserChatSettings> settings);
    Task<UserChatSettings?> GetAsync(Guid userId, Guid chatId, CancellationToken cancellationToken);
    Task<List<UserChatSettings>> GetByUserIdAsync(Guid userId, CancellationToken cancellationToken);
}

public interface IUserFolderSettingsRepository
{
    Task<UserFolderSettings?> GetByUserIdAsync(Guid userId, CancellationToken cancellationToken);
    Task UpdateAsync(UserFolderSettings settings, CancellationToken cancellationToken);
    Task RemoveByUserIdAsync(Guid userId, CancellationToken cancellationToken);
}
