/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { grpc } from "@improbable-eng/grpc-web";
import { SceneTreeAPI, } from "@vertexvis/scene-tree-protos/scenetree/protos/scene_tree_api_pb_service";
export function isGrpcServiceError(err) {
    return typeof err.code === 'number' && err.hasOwnProperty('metadata');
}
export function webSocketSubscriptionTransportFactory(options) {
    if (options.methodDefinition.methodName === SceneTreeAPI.Subscribe.methodName) {
        return grpc.WebsocketTransport()(options);
    }
    else {
        return grpc.CrossBrowserHttpTransport({ withCredentials: false })(options);
    }
}
//# sourceMappingURL=grpc.js.map
