"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const object_1 = require("../../../../util/object");
const _ids_1 = require("../../../_ids");
class DeepGet extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['obj', 'path'],
            o: ['result'],
        }, {}, system, _ids_1.ID_DEEP_GET);
    }
    f({ obj, path }, done) {
        let result;
        try {
            result = (0, object_1.deepGet)(obj, path);
        }
        catch (err) {
            done(undefined, 'key not found');
            return;
        }
        done({
            result,
        });
    }
}
exports.default = DeepGet;
//# sourceMappingURL=index.js.map