You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
PadelClub/PadelClub/Views/Tournament/Subscription/StoreItem.swift

40 lines
1.0 KiB

//
// StoreItem.swift
// Padel Club
//
// Created by Laurent Morvillier on 22/04/2024.
//
import Foundation
enum StoreItem: String, Identifiable, CaseIterable {
case monthlyClub = "app.padelclub.tournament.subscription.monthly.club"
case monthlyUnlimited = "app.padelclub.tournament.subscription.unlimited"
case fivePerMonth = "app.padelclub.tournament.subscription.five.per.month"
case unit = "app.padelclub.tournament.unit"
#if DEBUG
static let five: Int = 2
#else
static let five: Int = 5
#endif
var id: String { return self.rawValue }
var systemImage: String {
switch self {
case .monthlyClub: return "trophy.circle.fill"
case .monthlyUnlimited: return "infinity.circle.fill"
case .fivePerMonth: return "star.circle.fill"
case .unit: return "tennisball.circle.fill"
}
}
var isConsumable: Bool {
switch self {
case .monthlyUnlimited, .fivePerMonth, .monthlyClub: return false
case .unit: return true
}
}
}