"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.fetchAnalyticsCollection = exports.FetchAnalyticsCollectionAPILogic = void 0;
var _create_api_logic = require("../../../shared/api_logic/create_api_logic");
var _http = require("../../../shared/http");
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0; you may not use this file except in compliance with the Elastic License
 * 2.0.
 */

const fetchAnalyticsCollection = async ({
  name
}) => {
  const {
    http
  } = _http.HttpLogic.values;
  const route = `/internal/enterprise_search/analytics/collections/${name}`;
  const response = await http.get(route);
  return response;
};
exports.fetchAnalyticsCollection = fetchAnalyticsCollection;
const FetchAnalyticsCollectionAPILogic = (0, _create_api_logic.createApiLogic)(['analytics', 'analytics_collection_api_logic'], fetchAnalyticsCollection);
exports.FetchAnalyticsCollectionAPILogic = FetchAnalyticsCollectionAPILogic;