using System;
using System.Collections.Generic;
using Jellyfin.Database.Implementations.Entities;
using Jellyfin.Plugin.WatchedTogether.Configuration;
namespace Jellyfin.Plugin.WatchedTogether.Services;
///
/// Resolves shared-account groups from plugin configuration.
///
public interface IGroupService
{
///
/// Gets the active group owning the given shared account, if any.
///
/// The shared account identifier.
/// The group, or null if this user is not an enabled shared account.
SharedGroup? GetGroupForSharedUser(Guid sharedUserId);
///
/// Gets the members of a group that are currently eligible - existing and not disabled.
///
/// The group whose members to resolve.
/// The eligible member users.
IReadOnlyList GetEligibleMembers(SharedGroup group);
///
/// Determines whether the given user is a shared account managed by this plugin, regardless
/// of whether its group is currently enabled.
///
/// The user identifier to test.
/// true if the user is a managed shared account.
bool IsSharedAccount(Guid userId);
///
/// Removes a deleted user from every group, disabling any group left with fewer than two
/// members, and persists the result.
///
/// The identifier of the user that was removed.
void PruneDeletedUser(Guid userId);
}