import Foundation

/// API 配置信息
public enum APIConfig {
    /// API 基础 URL
    public static let baseURL = "https://api-dev.memorywake.com:31274/api/v1"
    
    /// 获取认证token
    public static var authToken: String {
        let token = KeychainHelper.getAccessToken() ?? ""
        if token.isEmpty {
            print("⚠️ [APIConfig] 未找到访问令牌")
        }
        return token
    }

    /// 认证请求头
    public static var authHeaders: [String: String] {
        let token = authToken
        var headers = [
            "Content-Type": "application/json",
            "Accept": "application/json"
        ]
        
        if !token.isEmpty {
            headers["Authorization"] = "Bearer \(token)"
        }
        
        return headers
    }
}