Files
bearwave-mac/Sources/BearWaveCore/Models/StationPage.swift
2026-06-25 09:21:42 +02:00

60 lines
1.5 KiB
Swift

import Foundation
enum StationPage: String, CaseIterable, Identifiable, Codable {
case top
case germany
case netherlands
case world
case search
case favorites
case recent
case manual
case group
var id: String { rawValue }
var title: String {
switch self {
case .top: String(localized: "Top")
case .germany: String(localized: "Germany")
case .netherlands: String(localized: "Netherlands")
case .world: String(localized: "World")
case .search: String(localized: "Search Results")
case .favorites: String(localized: "Favorites")
case .recent: String(localized: "Recent")
case .manual: String(localized: "Manual")
case .group: ""
}
}
var systemImage: String {
switch self {
case .top: "chart.bar.fill"
case .germany: "flag.fill"
case .netherlands: "flag"
case .world: "globe.europe.africa.fill"
case .search: "magnifyingglass"
case .favorites: "star.fill"
case .recent: "clock.arrow.circlepath"
case .manual: "plus.circle.fill"
case .group: "folder.fill"
}
}
}
enum StationSortMode: String, CaseIterable, Identifiable, Codable {
case name
case bitrate
case votes
var id: String { rawValue }
var title: String {
switch self {
case .name: String(localized: "Name")
case .bitrate: String(localized: "Bitrate")
case .votes: String(localized: "Votes")
}
}
}