"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowServiceMock = void 0;
const assert_1 = __importDefault(require("assert"));
const inversify_1 = require("inversify");
const index_js_1 = require("../services/index.js");
let FlowServiceMock = class FlowServiceMock extends index_js_1.FlowService {
    constructor() {
        super(...arguments);
        this.inputs = [];
        this.outputs = [];
    }
    async requestInputData(key) {
        const input = this.inputs.find(_ => _.key === key);
        (0, assert_1.default)(input, `Input ${key} not found`);
        return input.data;
    }
    async peekInputData(key) {
        const input = this.inputs.find(_ => _.key === key);
        return input ? input.data : undefined;
    }
    async resetInputData(key) {
        this.inputs = this.inputs.filter(_ => _.key !== key);
    }
    async sendOutputData(key, data) {
        this.outputs.push({ key, data });
    }
    async sendScreenshot() { }
    async sendHtmlSnapshot() { }
    async sendEvent() { }
};
FlowServiceMock = __decorate([
    (0, inversify_1.injectable)()
], FlowServiceMock);
exports.FlowServiceMock = FlowServiceMock;
//# sourceMappingURL=flow.mock.js.map