1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 05:40:32 +05:30
yattee/Model/TrendingCategory.swift
2022-10-27 18:03:57 +02:00

32 lines
695 B
Swift

import Defaults
import Foundation
enum TrendingCategory: String, CaseIterable, Identifiable, Defaults.Serializable {
case `default`, music, gaming, movies
var id: RawValue {
rawValue
}
var title: RawValue {
switch self {
case .default:
return "All".localized()
case .music:
return "Music".localized()
case .gaming:
return "Gaming".localized()
case .movies:
return "Movies".localized()
}
}
var name: String {
id == "default" ? "Trending".localized() : title
}
var controlLabel: String {
id == "default" ? "All".localized() : title
}
}