using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Entities.Audio;
using LinkedChildType = MediaBrowser.Controller.Entities.LinkedChildType;
namespace MediaBrowser.Controller.Persistence;
///
/// Provides linked children query and manipulation operations.
///
public interface ILinkedChildrenService
{
///
/// Gets the IDs of linked children for the specified parent.
///
/// The parent item ID.
/// Optional child type filter.
/// List of child item IDs.
IReadOnlyList GetLinkedChildrenIds(Guid parentId, int? childType = null);
///
/// Gets all artist matches from the database.
///
/// The names of the artists.
/// A map of the artist name and the potential matches.
IReadOnlyDictionary FindArtists(IReadOnlyList artistNames);
///
/// Gets parent IDs that reference the specified child with LinkedChildType.Manual.
///
/// The child item ID.
/// List of parent IDs that reference the child.
IReadOnlyList GetManualLinkedParentIds(Guid childId);
///
/// Updates LinkedChildren references from one child to another.
///
/// The child ID to re-route from.
/// The child ID to re-route to.
/// List of parent item IDs whose LinkedChildren were modified.
IReadOnlyList RerouteLinkedChildren(Guid fromChildId, Guid toChildId);
///
/// Creates or updates a LinkedChild entry.
///
/// The parent item ID.
/// The child item ID.
/// The type of linked child relationship.
void UpsertLinkedChild(Guid parentId, Guid childId, LinkedChildType childType);
}