"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "CoreOutput", {
  enumerable: true,
  get: function () {
    return _pulumiAws.CoreOutput;
  }
});
Object.defineProperty(exports, "configureAdminCognitoFederation", {
  enumerable: true,
  get: function () {
    return _pulumiAws.configureAdminCognitoFederation;
  }
});
exports.createCoreApp = createCoreApp;
var _enterprise = require("@webiny/pulumi-aws/enterprise");
var _plugins = require("../core/plugins");
var _pulumiAws = require("@webiny/pulumi-aws");
function createCoreApp(projectAppParams = {}) {
  const builtInPlugins = [];
  if (projectAppParams.elasticSearch || projectAppParams.openSearch) {
    builtInPlugins.push(_plugins.generateDdbToEsHandler);
    if (projectAppParams.elasticSearch) {
      builtInPlugins.push(_plugins.checkEsServiceRole);
    } else {
      builtInPlugins.push(_plugins.checkOsServiceRole);
    }
  }
  const customPlugins = projectAppParams.plugins ? [...projectAppParams.plugins] : [];
  return {
    id: "core",
    name: "Core",
    description: "Your project's stateful cloud infrastructure resources.",
    pulumi: (0, _enterprise.createCorePulumiApp)(projectAppParams),
    plugins: [builtInPlugins, customPlugins]
  };
}

//# sourceMappingURL=createCoreApp.js.map