// // AppLegalURLs.swift // App for Indeed // import AppKit import Foundation /// Legal, support, and marketing pages hosted on Google Sites. enum AppLegalURLs { private static let siteRoot = "https://sites.google.com/view/app-for-indeed" static let marketingHome = URL(string: "\(siteRoot)/home")! static let privacyPolicy = URL(string: "\(siteRoot)/privacy-policy")! /// Google Sites page slug: `terms-of-services` (matches published site navigation). static let termsOfUse = URL(string: "\(siteRoot)/terms-of-services")! static let support = URL(string: "\(siteRoot)/support")! /// Opens the URL in Safari when available; otherwise uses the system default browser. static func openInSafari(_ url: URL) { let safariApp = URL(fileURLWithPath: "/Applications/Safari.app") guard FileManager.default.fileExists(atPath: safariApp.path) else { NSWorkspace.shared.open(url) return } NSWorkspace.shared.open( [url], withApplicationAt: safariApp, configuration: NSWorkspace.OpenConfiguration() ) { _, error in if error != nil { NSWorkspace.shared.open(url) } } } }