import Foundation
import VelodyDomain

public struct HealthStatusSummary: Hashable, Sendable {
    public var databaseStatus: String
    public var storageStatus: String

    public init(
        databaseStatus: String,
        storageStatus: String
    ) {
        self.databaseStatus = databaseStatus
        self.storageStatus = storageStatus
    }
}

public protocol VelodyAPIClient: Sendable {
    func fetchHealthStatus() async throws -> HealthStatusSummary
}

public struct StubVelodyAPIClient: VelodyAPIClient {
    public let environment: ServerEnvironment

    public init(environment: ServerEnvironment) {
        self.environment = environment
    }

    public func fetchHealthStatus() async throws -> HealthStatusSummary {
        _ = environment
        return HealthStatusSummary(
            databaseStatus: "placeholder",
            storageStatus: "placeholder"
        )
    }
}
