text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.normalizeOptions = void 0;
  const react_1 = require("@nrwl/react");
  const devkit_1 = require("@nrwl/devkit");
  const linter_1 = require("@nrwl/linter");
  function normalizeOptions(host, options) {
      const appDirectory = options.directory
          ? `${devkit_1.names(options.directory).fileName}/${devkit_1.names(options.name).fileName}`
          : devkit_1.names(options.name).fileName;
      const { appsDir } = devkit_1.getWorkspaceLayout(host);
      const appProjectName = appDirectory.replace(new RegExp('/', 'g'), '-');
      const e2eProjectName = `${appProjectName}-e2e`;
      const appProjectRoot = `${appsDir}/${appDirectory}`;
      const e2eProjectRoot = `${appsDir}/${appDirectory}-e2e`;
      const parsedTags = options.tags
          ? options.tags.split(',').map((s) => s.trim())
          : [];
      const fileName = 'index';
      const styledModule = /^(css|scss|less|styl)$/.test(options.style)
          ? null
          : options.style;
      react_1.assertValidStyle(options.style);
      return Object.assign(Object.assign({}, options), { name: devkit_1.names(options.name).fileName, projectName: appProjectName, linter: options.linter || linter_1.Linter.EsLint, unitTestRunner: options.unitTestRunner || 'jest', e2eTestRunner: options.e2eTestRunner || 'cypress', style: options.style || 'css', appProjectRoot,
          e2eProjectRoot,
          e2eProjectName,
          parsedTags,
          fileName,
          styledModule });
  }
  exports.normalizeOptions = normalizeOptions;
  //# sourceMappingURL=normalize-options.js.map