"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createAdminApp = createAdminApp;
var _enterprise = require("@webiny/pulumi-aws/enterprise");
var _plugins = require("../react/plugins");
var _ensureApiDeployed = require("../utils/ensureApiDeployed");
function createAdminApp(projectAppParams = {}) {
  const builtInPlugins = [(0, _plugins.uploadAppToS3)({
    folder: "apps/admin"
  }), ...(0, _ensureApiDeployed.createEnsureApiDeployedPlugins)("admin")];
  const customPlugins = projectAppParams.plugins ? [...projectAppParams.plugins] : [];
  return {
    id: "admin",
    name: "Admin",
    description: "Your project's admin area§.",
    cli: {
      // Default args for the "yarn webiny watch ..." command (we don't need deploy option while developing).
      watch: {
        deploy: false
      }
    },
    pulumi: (0, _enterprise.createAdminPulumiApp)(projectAppParams),
    plugins: [builtInPlugins, customPlugins]
  };
}

//# sourceMappingURL=createAdminApp.js.map