"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../Class/Holder");
const _ids_1 = require("../../../../_ids");
class Get1 extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['obj', 'name'],
            fo: ['value'],
            i: [],
            o: ['done'],
        }, {
            input: {
                obj: {
                    ref: true,
                },
            },
            output: {
                value: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_GET_1, 'done');
    }
    async f({ obj, name }, done, fail) {
        let value;
        try {
            value = await obj.get(name);
        }
        catch (err) {
            fail(err.message);
            return;
        }
        done({ value });
    }
    b() {
        this._output.done.push(true);
    }
}
exports.default = Get1;
//# sourceMappingURL=index.js.map