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