// Author: fengshengxiong
// Date: 2024/6/13
// Description: 资源类型

enum BrowseType {
  /// 电台/单曲
  musicVideoTypeAtv(name: 'MUSIC_VIDEO_TYPE_ATV'),

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

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

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

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

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

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

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

  final String name;
}

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;
    }
  }
}
