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