"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 isString_1 = __importDefault(require("lodash/isString"));
const default_session_1 = require("../../../session/default-session");
const historical_pricing_provider_1 = require("../historical-pricing-provider");
const table_builder_1 = require("../table-builder");
function Definition(params, fields) {
    const parameters = (0, isString_1.default)(params) ? { universe: params, fields } : params;
    const tableBuilder = new table_builder_1.TableBuilderImp();
    return {
        getData(session = (0, default_session_1.getDefault)()) {
            const historicalPricingProvider = new historical_pricing_provider_1.HistoricalPricingProvider(session, tableBuilder);
            return historicalPricingProvider.getSummaries(parameters);
        },
    };
}
exports.Definition = Definition;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb250ZW50L2hpc3RvcmljYWwtcHJpY2luZy9zdW1tYXJpZXMvZGVmaW5pdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSwrREFBdUM7QUFFdkMsc0VBQThEO0FBRzlELGdGQUEyRTtBQUUzRSxvREFBbUQ7QUFLbkQsU0FBZ0IsVUFBVSxDQUFDLE1BQXVCLEVBQUUsTUFBaUI7SUFDakUsTUFBTSxVQUFVLEdBQVcsSUFBQSxrQkFBUSxFQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQztJQUNwRixNQUFNLFlBQVksR0FBRyxJQUFJLCtCQUFlLEVBQUUsQ0FBQztJQUUzQyxPQUFPO1FBQ0gsT0FBTyxDQUFDLFVBQW1CLElBQUEsNEJBQVUsR0FBRTtZQUNuQyxNQUFNLHlCQUF5QixHQUFHLElBQUksdURBQXlCLENBQUMsT0FBTyxFQUFFLFlBQVksQ0FBQyxDQUFDO1lBRXZGLE9BQU8seUJBQXlCLENBQUMsWUFBWSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1FBQzlELENBQUM7S0FDSixDQUFDO0FBQ04sQ0FBQztBQVhELGdDQVdDIn0=