"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Semifunctional_1 = require("../../../../../Class/Semifunctional");
const _ids_1 = require("../../../../_ids");
class Append extends Semifunctional_1.Semifunctional {
    constructor(system) {
        super({
            fi: ['form', 'name', 'value'],
            fo: [],
            i: [],
            o: ['done'],
        }, {
            input: {
                form: {
                    ref: true,
                },
                value: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_APPEND_1);
    }
    async f({ form, name, value }, done, fail) {
        try {
            const data = await value.raw();
            form.append(name, data);
        }
        catch (err) {
            fail(err.message.toString());
            return;
        }
        done({
            done: true,
        });
    }
    b() {
        this._output.done.push(true);
    }
}
exports.default = Append;
//# sourceMappingURL=index.js.map