"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Definition = void 0;
const isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));
const default_session_1 = require("../../../../session/default-session");
const curves_provider_1 = require("../curves-provider");
function Definition(params, outputs) {
    let parameters;
    if ((0, isPlainObject_1.default)(params)) {
        parameters = params;
    }
    else {
        parameters = {
            universe: params,
            outputs,
        };
    }
    return {
        getData(session = (0, default_session_1.getDefault)()) {
            const curvesProvider = new curves_provider_1.CurvesProvider(session);
            return curvesProvider.getForwardCurves(parameters);
        },
    };
}
exports.Definition = Definition;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9jb250ZW50L2lwYS9jdXJ2ZXMvZm9yd2FyZC1jdXJ2ZXMvZGVmaW5pdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSx5RUFBaUQ7QUFFakQseUVBQWlFO0FBR2pFLHdEQUFvRDtBQU1wRCxTQUFnQixVQUFVLENBQUMsTUFBbUUsRUFBRSxPQUFrQjtJQUM5RyxJQUFJLFVBQWtCLENBQUM7SUFDdkIsSUFBSSxJQUFBLHVCQUFhLEVBQUMsTUFBTSxDQUFDLEVBQUU7UUFDdkIsVUFBVSxHQUFHLE1BQWdCLENBQUM7S0FDakM7U0FBTTtRQUNILFVBQVUsR0FBRztZQUNULFFBQVEsRUFBRSxNQUE2QjtZQUN2QyxPQUFPO1NBQ1YsQ0FBQztLQUNMO0lBRUQsT0FBTztRQUNILE9BQU8sQ0FBQyxVQUFtQixJQUFBLDRCQUFVLEdBQUU7WUFDbkMsTUFBTSxjQUFjLEdBQUcsSUFBSSxnQ0FBYyxDQUFDLE9BQU8sQ0FBQyxDQUFDO1lBQ25ELE9BQU8sY0FBYyxDQUFDLGdCQUFnQixDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQ3ZELENBQUM7S0FDSixDQUFDO0FBQ04sQ0FBQztBQWpCRCxnQ0FpQkMifQ==