import Foundation
/// Everything an `IrdClient` needs. Every field has a default; tests inject the
/// transport and clock, apps inject a credential store.
public struct Configuration: Sendable {
/// Base URL of the API; trailing slashes are ignored.
public var apiURL: URL = URL(string: "https://api.ird.ro")!
/// Where the bearer comes from, consulted on every request.
public var credential: any CredentialProvider = NoCredential()
/// Extra headers merged last, so they override the computed ones.
public var headers: [String: String] = [:]
/// Per-request timeout; nil keeps the session default.
public var timeout: TimeInterval? = nil
public var transport: any HTTPTransport = URLSessionHTTPTransport()
public var clock: any IrdClock = SystemClock()
public init() {}
public init(apiKey: String) {
self.credential = StaticCredential(apiKey)
}
}