import Foundation
import ComposeApp

/// Bridges Kotlin sealed ApiResult subclasses in Swift without generic-cast warnings.
enum ApiResultBridge {
    static func error(from state: Any) -> ApiResultError? {
        state as? ApiResultError
    }

    static func isError(_ state: Any) -> Bool {
        error(from: state) != nil
    }
}
