import Foundation

enum Config {
    static let gatewayURL: URL = {
        if let override = UserDefaults.standard.string(forKey: "gateway_url"),
           let url = URL(string: override) {
            return url
        }
        return URL(string: "https://dash.quadjourney.com")!
    }()

    static func apiURL(_ path: String) -> URL {
        gatewayURL.appendingPathComponent(path)
    }
}
