"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getAllIndices = void 0;
var _coreSavedObjectsServer = require("@kbn/core-saved-objects-server");
/*
 * 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 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */

const getAllIndices = ({
  registry
}) => {
  return [...new Set(registry.getAllTypes().map(type => {
    var _type$indexPattern;
    return (_type$indexPattern = type.indexPattern) !== null && _type$indexPattern !== void 0 ? _type$indexPattern : _coreSavedObjectsServer.MAIN_SAVED_OBJECT_INDEX;
  }))];
};
exports.getAllIndices = getAllIndices;