2021-09-27 03:49:50 +05:30
|
|
|
import Defaults
|
2022-09-04 20:58:30 +05:30
|
|
|
import Foundation
|
2021-09-27 03:49:50 +05:30
|
|
|
|
|
|
|
enum TrendingCategory: String, CaseIterable, Identifiable, Defaults.Serializable {
|
2021-06-17 15:32:39 +05:30
|
|
|
case `default`, music, gaming, movies
|
|
|
|
|
2021-11-02 03:26:18 +05:30
|
|
|
var id: RawValue {
|
2021-06-17 15:32:39 +05:30
|
|
|
rawValue
|
|
|
|
}
|
|
|
|
|
2021-11-02 03:26:18 +05:30
|
|
|
var title: RawValue {
|
2022-09-04 20:58:30 +05:30
|
|
|
switch self {
|
|
|
|
case .default:
|
|
|
|
return "All".localized()
|
|
|
|
case .music:
|
|
|
|
return "Music".localized()
|
|
|
|
case .gaming:
|
|
|
|
return "Gaming".localized()
|
|
|
|
case .movies:
|
|
|
|
return "Movies".localized()
|
|
|
|
}
|
2021-06-17 15:32:39 +05:30
|
|
|
}
|
2021-11-02 03:26:18 +05:30
|
|
|
|
2022-12-10 06:49:36 +05:30
|
|
|
var systemImage: String {
|
|
|
|
switch self {
|
|
|
|
case .default:
|
|
|
|
return "chart.bar"
|
|
|
|
case .music:
|
|
|
|
return "music.note"
|
|
|
|
case .gaming:
|
|
|
|
return "gamecontroller"
|
|
|
|
case .movies:
|
|
|
|
return "film"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-02 03:26:18 +05:30
|
|
|
var name: String {
|
2022-09-04 20:58:30 +05:30
|
|
|
id == "default" ? "Trending".localized() : title
|
2021-11-02 03:26:18 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
var controlLabel: String {
|
2022-09-04 20:58:30 +05:30
|
|
|
id == "default" ? "All".localized() : title
|
2021-11-02 03:26:18 +05:30
|
|
|
}
|
2023-05-27 03:54:53 +05:30
|
|
|
|
|
|
|
var type: String {
|
|
|
|
rawValue.capitalized
|
|
|
|
}
|
2021-06-17 15:32:39 +05:30
|
|
|
}
|