namespace Model.Stub;

public class Manager
{
    public IDataManager DataManager { get; set; }

    public IEnumerable<Album> Albums;

    public IEnumerable<Title> Titles;

    public IEnumerable<Playlist> Playlists;

    public Manager()
    {
        DataManager = new Stub();
        // Albums = DataManager.GetAlbum(); 
        Albums = new List<Album>();
        Titles = new List<Title>();
        Playlists = new List<Playlist>();
    }

    public void AddAlbum(Album album)
    {
        Albums.Prepend(album);
    }

    public void AddTitle(Title title)
    {
        Titles.Prepend(title);
    }
    public void AddPlaylist(Playlist playlist)
    {
        Playlists.Prepend(playlist);
    }

    public void RemoveAlbum(Album album)
    {
        Albums.ToList().Remove(album);
    }

    public void RemoveTitle(Title title)
    {
        Titles.ToList().Remove(title);
    }

    public void RemovePlaylist(Playlist playlist)
    {
        Playlists.ToList().Remove(playlist);
    }

}
