// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System;
using System.Collections.Generic;
using CommunityToolkit.Diagnostics;
using OwlCore.Extensions;
using StrixMusic.Sdk.AppModels;
using StrixMusic.Sdk.CoreModels;
namespace StrixMusic.Sdk.AdapterModels
{
///
/// A concrete class that converts a to a .
///
public sealed class MergedLyrics : ILyrics, IMergedMutable
{
private readonly ICoreLyrics _source;
///
/// Creates a new instance of .
///
public MergedLyrics(ICoreLyrics source, MergedCollectionConfig config)
{
_source = source;
Sources = source.IntoList();
Track = new MergedTrack(source.Track.IntoList(), config);
}
///
public Dictionary? TimedLyrics => _source.TimedLyrics;
///
public string? TextLyrics => _source.TextLyrics;
///
public void AddSource(ICoreLyrics itemToMerge)
{
ThrowHelper.ThrowNotSupportedException($"Merging lyrics from multiple sources not yet supported.");
}
///
public void RemoveSource(ICoreLyrics itemToRemove)
{
ThrowHelper.ThrowNotSupportedException($"Merging lyrics from multiple sources not yet supported.");
}
///
public IReadOnlyList Sources { get; }
///
public event EventHandler? SourcesChanged;
///
public ITrack Track { get; }
///
public bool Equals(ICoreLyrics other)
{
return false;
}
}
}