1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 23:00:32 +05:30
yattee/Model/TrendingCategory.swift

22 lines
406 B
Swift
Raw Normal View History

import Defaults
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 {
2021-06-17 15:32:39 +05:30
rawValue.capitalized
}
2021-11-02 03:26:18 +05:30
var name: String {
id == "default" ? "Trending" : title
}
var controlLabel: String {
id == "default" ? "All" : title
}
2021-06-17 15:32:39 +05:30
}