"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 search_provider_1 = require("../search-provider");
const table_builder_1 = require("./table-builder");
function Definition(params) {
    const parameters = (0, isString_1.default)(params) ? { query: params } : params;
    const tableBuilder = new table_builder_1.TableBuilderImp();
    return {
        getData(session = (0, default_session_1.getDefault)()) {
            const searchProvider = new search_provider_1.SearchProvider(session, tableBuilder);
            return searchProvider.search(parameters);
        },
    };
}
exports.Definition = Definition;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9jb250ZW50L3NlYXJjaC9zZWFyY2gvZGVmaW5pdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSwrREFBdUM7QUFFdkMsc0VBQThEO0FBRzlELHdEQUFvRDtBQUVwRCxtREFBa0Q7QUFJbEQsU0FBZ0IsVUFBVSxDQUFDLE1BQXVCO0lBQzlDLE1BQU0sVUFBVSxHQUFXLElBQUEsa0JBQVEsRUFBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQztJQUN6RSxNQUFNLFlBQVksR0FBRyxJQUFJLCtCQUFlLEVBQUUsQ0FBQztJQUUzQyxPQUFPO1FBQ0gsT0FBTyxDQUFDLFVBQW1CLElBQUEsNEJBQVUsR0FBRTtZQUNuQyxNQUFNLGNBQWMsR0FBRyxJQUFJLGdDQUFjLENBQWMsT0FBTyxFQUFFLFlBQVksQ0FBQyxDQUFDO1lBRTlFLE9BQU8sY0FBYyxDQUFDLE1BQU0sQ0FBQyxVQUFVLENBQUMsQ0FBQztRQUM3QyxDQUFDO0tBQ0osQ0FBQztBQUNOLENBQUM7QUFYRCxnQ0FXQyJ9