/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { StreamApiEventDispatcher } from "../stream/dispatcher";
export const SCENE_ALTERATION_DEFAULT_TIMEOUT_MS = 1000 * 30;
export class SceneOperationExecuteResult {
    constructor(stream, decodeFrame, correlationId, timeout) {
        this.onFrameDrawn = new StreamApiEventDispatcher(stream, (msg) => {
            var _a, _b, _c;
            return !!((_c = (_b = (_a = msg.request) === null || _a === void 0 ? void 0 : _a.drawFrame) === null || _b === void 0 ? void 0 : _b.frameCorrelationIds) === null || _c === void 0 ? void 0 : _c.some((id) => id === correlationId));
        }, (msg) => {
            var _a;
            return ((_a = msg.request) === null || _a === void 0 ? void 0 : _a.drawFrame) != null
                ? decodeFrame(msg.request.drawFrame)
                : undefined;
        }, timeout !== null && timeout !== void 0 ? timeout : SCENE_ALTERATION_DEFAULT_TIMEOUT_MS);
    }
}
//# sourceMappingURL=sceneOperationExecuteResult.js.map
