using System.Collections.ObjectModel;

namespace Model;

public interface IDataManager
{
    // Create
    void AddAlbum(Album album);

    void AddAlbums(List<Album> albumsList);

    void AddArtist(Artist artist);

    void AddArtists(List<Artist> artistsList);

    void AddPlaylist(Playlist playlist);

    void AddPlaylists(List<Playlist> playlistsList);

    void AddCustomTitle(CustomTitle title);

    void AddCustomTitles(List<CustomTitle> customTitlesList);

    void AddInfoTitle(InfoTitle title);

    void AddInfoTitles(List<InfoTitle> infoTitlesList);

    // Read
    ObservableCollection<CustomTitle> GetCustomTitles();

    CustomTitle? GetCustomTitleByUrl(string custom);

    ObservableCollection<InfoTitle> GetInfoTitles();

    InfoTitle? GetInfoTitleByName(string name);

    ObservableCollection<Album> GetAlbums();

    Album? GetAlbumByName(string name);

    List<Artist> GetArtists();

    Artist? GetArtistByName(string name);

    ObservableCollection<Playlist> GetPlaylists();

    Playlist? GetPlaylistByName(string name);


    // Update
    void UpdateCustomTitle(CustomTitle title, string name, string url, string info, string path);

    void UpdateCustomTitleByUrl(string url, string name, string newUrl, string info, string path);

    void UpdateInfoTitle(InfoTitle title, string name, string url, string info, Artist artist, string description, Genre genre);

    void UpdateInfoTitleByName(string name, string newUrl, string info, Artist artist, string description, Genre genre);

    void UpdateInfoTitleByArtistName(InfoTitle title, string name, string url, string info, string artist, string description, Genre genre);

    void UpdateInfoTitleByNameByArtistName(string name, string newUrl, string info, string artist, string description, Genre genre);

    void UpdateAlbum(Album album, string name, string url, Artist artist, string description, string info);

    void UpdateAlbumByName(string name, string newUrl, Artist artist, string description, string info);

    void UpdateAlbumByArtistName(Album album, string name, string url, string artist, string description, string info);

    void UpdateAlbumByNameByArtistName(string name, string newUrl, string artist, string description, string info);

    void UpdatePlaylist(Playlist playlist, string name, string description, string url);

    void UpdatePlaylistByName(string name, string description, string newUrl);

    void UpdateArtist(Artist artist, string name);

    void UpdateArtistByName(string name, string newName);

    // Delete
    void RemoveAlbum(Album album);

    void RemoveAlbums(List<Album> albumsList);

    void RemoveArtist(Artist artist);

    void RemoveArtists(List<Artist> artistsList);

    void RemovePlaylist(Playlist playlist);

    void RemovePlaylists(List<Playlist> playlistsList);

    void RemoveCustomTitle(CustomTitle title);

    void RemoveCustomTitles(List<CustomTitle> customTitlesList);

    void RemoveInfoTitle(InfoTitle title);

    void RemoveInfoTitles(List<InfoTitle> infoTitlesList);

    // Serialization
    void LoadSerialization();

    void SaveSerialization();

    // Exists
    bool ExistsPlaylist(Playlist playlist);

    bool ExistsPlaylistByName(string name);

    bool ExistsAlbum(Album album);

    bool ExistsAlbumByName(string name);

    bool ExistsArtist(Artist artist);

    bool ExistsArtistByName(string name);

    bool ExistsCustomTitle(CustomTitle title);

    bool ExistsCustomTitleByName(string name);

    bool ExistsInfoTitle(InfoTitle title);

    bool ExistsInfoTitleByName(string name);
}