//
//  LNNetworkConfig.swift
//  Lanu
//
//  Created by OneeChan on 2025/11/6.
//

import Foundation


class LNNetworkConfig {
    static let host: String = {
        LNAppConfig.shared.curEnv == .test ? "https://test-api.gami.vip" : "https://api.gami.vip"
    }()
}


extension LNBottomSheetMenu {
    static func showEnvMenu() {
        let panel = LNBottomSheetMenu()
        panel.update(LNAppEnvType.allCases.map({ $0.text })) { index, _ in
            let env = LNAppEnvType.allCases[index]
            LNAppConfig.shared.curEnv = env
            
            exit(0)
        }
        panel.popup()
    }
}
