"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../../Class/Functional");
const _ids_1 = require("../../../../_ids");
class Get extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['obj', 'name'],
            o: ['value'],
        }, {
            input: {
                obj: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_GET_0);
    }
    async f({ obj, name }, done) {
        let value;
        try {
            value = await obj.get(name);
        }
        catch (err) {
            done(undefined, err.message);
            return;
        }
        done({ value });
    }
}
exports.default = Get;
//# sourceMappingURL=index.js.map