// Author: fengshengxiong
// Date: 2024/6/13
// Description: 音乐类型

enum MusicType {
  /// 单曲
  musicVideoTypeAtv(name: 'MUSIC_VIDEO_TYPE_ATV'),

  /// 视频
  musicVideoTypeOmv(name: 'MUSIC_VIDEO_TYPE_OMV'),

  /// 专辑
  musicPageTypeAlbum(name: 'MUSIC_PAGE_TYPE_ALBUM'),

  /// 歌单/列表
  musicPageTypePlaylist(name: 'MUSIC_PAGE_TYPE_PLAYLIST'),

  /// 艺术家
  musicPageTypeArtist(name: 'MUSIC_PAGE_TYPE_ARTIST');

  /// 歌词
  // musicPageTypeTrackLyrics(name: 'MUSIC_PAGE_TYPE_TRACK_LYRICS'),

  /// 相关内容
  // musicPageTypeTrackRelated(name: 'MUSIC_PAGE_TYPE_TRACK_RELATED');

  const MusicType({
    required this.name,
  });

  final String name;
}

extension MusicTypeExtension on MusicType {
  static bool isThereAny(String? type) {
    if (type == MusicType.musicVideoTypeAtv.name ||
        // type == BrowseType.musicVideoTypeOmv.name ||
        type == MusicType.musicPageTypeAlbum.name ||
        type == MusicType.musicPageTypePlaylist.name
        // type == BrowseType.musicPageTypeArtist.name
    ) {
      return true;
    } else {
      return false;
    }
  }
}
