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.
48 lines
1.3 KiB
48 lines
1.3 KiB
//
|
|
// StoreItem.swift
|
|
// Padel Club
|
|
//
|
|
// Created by Laurent Morvillier on 22/04/2024.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public enum StoreItem: String, Identifiable, CaseIterable {
|
|
case monthlyUnlimited = "app.padelclub.tournament.subscription.unlimited"
|
|
case fivePerMonth = "app.padelclub.tournament.subscription.five.per.month"
|
|
case unit = "app.padelclub.tournament.unit"
|
|
case unit10Pack = "app.padelclub.tournament.unit.10"
|
|
|
|
#if DEBUG
|
|
public static let five: Int = 2
|
|
#else
|
|
public static let five: Int = 5
|
|
#endif
|
|
|
|
public var id: String { return self.rawValue }
|
|
|
|
public var summarySystemImage: String {
|
|
switch self {
|
|
case .monthlyUnlimited: return "infinity.circle.fill"
|
|
case .fivePerMonth: return "star.circle.fill"
|
|
case .unit, .unit10Pack: return "tennisball.circle.fill"
|
|
}
|
|
}
|
|
|
|
public var systemImage: String {
|
|
switch self {
|
|
case .monthlyUnlimited: return "infinity.circle.fill"
|
|
case .fivePerMonth: return "star.circle.fill"
|
|
case .unit: return "1.circle.fill"
|
|
case .unit10Pack: return "10.circle.fill"
|
|
}
|
|
}
|
|
|
|
public var isConsumable: Bool {
|
|
switch self {
|
|
case .monthlyUnlimited, .fivePerMonth: return false
|
|
case .unit, .unit10Pack: return true
|
|
}
|
|
}
|
|
|
|
}
|
|
|