"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class ReadAsText extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['reader', 'file', 'opt'],
            o: ['text'],
        }, {
            input: {
                file: {
                    ref: true,
                },
                reader: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_READ_AS_TEXT);
    }
    async f({ reader, file, opt }, done) {
        const file_ = file.raw();
        const text = await reader.readAsText(file_);
        done({ text });
    }
}
exports.default = ReadAsText;
//# sourceMappingURL=index.js.map