// Author: fengshengxiong
// Date: 2024/6/13
// Description: BrowseType

enum BrowseType {
  musicVideoTypeAtv(name: 'MUSIC_VIDEO_TYPE_ATV', remark: '电台/单曲'),
  musicVideoTypeOmv(name: 'MUSIC_VIDEO_TYPE_OMV', remark: '视频'),
  musicPageTypeAlbum(name: 'MUSIC_PAGE_TYPE_ALBUM', remark: '专辑'),
  // musicPageTypeArtist(name: 'MUSIC_PAGE_TYPE_ARTIST', remark: '艺术家'),
  musicPageTypePlaylist(name: 'MUSIC_PAGE_TYPE_PLAYLIST', remark: '歌单/列表');
  // musicPageTypeTrackLyrics(name: 'MUSIC_PAGE_TYPE_TRACK_LYRICS', remark: '歌词'),
  // musicPageTypeTrackRelated(name: 'MUSIC_PAGE_TYPE_TRACK_RELATED', remark: '相关内容');

  const BrowseType({
    required this.name,
    required this.remark,
  });

  final String name;
  final String remark;
}

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