"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../Class/Holder");
const _ids_1 = require("../../../../_ids");
class Set0 extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['obj', 'name', 'data'],
            fo: ['done'],
            i: [],
            o: [],
        }, {
            input: {
                obj: {
                    ref: true,
                },
                data: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_SET_2);
    }
    async f({ obj, name, data }, done, fail) {
        try {
            const raw = await data.raw();
            await obj.set(name, raw);
        }
        catch (err) {
            fail(err.message);
            return;
        }
        done({ done: 1 });
    }
}
exports.default = Set0;
//# sourceMappingURL=index.js.map