"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../../Class/Semifunctional");
const _ids_1 = require("../../../../_ids");
class Read extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['value', 'any'],
            fo: ['data'],
            o: ['done'],
        }, {
            input: {
                value: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_READ);
    }
    f({ value, any }, done, fail) {
        value.read((data, err) => {
            if (err) {
                fail(err);
                return;
            }
            done({ data });
        });
    }
    b() {
        this._output.done.push(true);
    }
}
exports.default = Read;
//# sourceMappingURL=index.js.map