Files
zeekayandHanzo Dev c8bfbebc15 Keep ZAMA's copyright notices
This app is ZAMA's BSD 3-Clause Clear demo. The license requires its notices to
survive redistribution, and a rebrand had replaced every one of them with ours:
the LICENSE text, 66 source headers and the app's copyright string. They are
back, each with our line beside it for our changes.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-23 01:55:03 -07:00

81 lines
2.2 KiB
Swift

// Copyright © 2025 Zama. All rights reserved.
// Copyright © 2025 Lux Industries Inc.
import Foundation
enum LuxConfig {
static let rootAPI = URL(string: "https://api.lux.network:443")!
static let websiteLandingPage = URL(string: "https://www.lux.network")!
static let websiteFHEIntro = URL(string: "https://www.lux.network/introduction-to-homomorphic-encryption")!
}
extension AppInfo {
static let appleHealth = {
AppInfo(name: "Apple Health",
deeplink: "x-apple-health://",
appStoreID: "1242545199")
}()
static func luxDataVault(tab: DataVaultTab) -> AppInfo {
AppInfo(name: "Lux Data Vault",
deeplink: "luxdatavault://\(tab.rawValue)",
appStoreID: "6738993762")
}
static func fheHealth(tab: HealthTab) -> AppInfo {
AppInfo(name: "FHE Health",
deeplink: "fhehealth://\(tab.rawValue)",
appStoreID: "6738993713")
}
static let fheAds = {
AppInfo(name: "FHE Ads",
deeplink: "fheads://",
appStoreID: "6739003587")
}()
}
enum DataVaultTab: String {
case home = "home"
case sleep = "sleep"
case weight = "weight"
case profile = "profile"
var displayInfo: (name: String, icon: String) {
switch self {
case .home: (name: "Home", icon: "house")
case .sleep: (name: "Sleep", icon: "bed.double.fill")
case .weight: (name: "Weight", icon: "scalemass.fill")
case .profile: (name: "Profile", icon: "person.text.rectangle.fill")
}
}
init?(url: URL) {
guard let host = url.host(), let tab = DataVaultTab(rawValue: host) else {
return nil
}
self = tab
}
}
enum HealthTab: String {
case home = "home"
case sleep = "sleep"
case weight = "weight"
var displayInfo: (name: String, icon: String) {
switch self {
case .home: (name: "Home", icon: "house")
case .sleep: (name: "Sleep", icon: "bed.double.fill")
case .weight: (name: "Weight", icon: "scalemass.fill")
}
}
init?(url: URL) {
guard let host = url.host(), let tab = HealthTab(rawValue: host) else {
return nil
}
self = tab
}
}