text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  const project_1 = require("./project");
  const array_1 = require("./array");
  function cleanStyles(projectStyles, defaultStyles) {
      return projectStyles.filter((style) => {
          return style !== defaultStyles[0] && style !== defaultStyles[1];
      });
  }
  function addStylesToApp(host, project, config, styles) {
      const projectName = project_1.getProjectName(host, project);
      const projectBuildOptopns = config['projects'][projectName]['architect']['build']['options'];
      const defaultStyles = [
          'node_modules/devextreme/dist/css/dx.light.css',
          'node_modules/devextreme/dist/css/dx.common.css'
      ];
      let projectStyles = projectBuildOptopns['styles'];
      if (!styles) {
          styles = defaultStyles;
      }
      else {
          projectStyles = cleanStyles(projectStyles, defaultStyles);
      }
      styles.forEach((style) => {
          projectStyles.unshift(style);
      });
      projectBuildOptopns['styles'] = array_1.makeArrayUnique(projectStyles);
      return config;
  }
  exports.addStylesToApp = addStylesToApp;
  //# sourceMappingURL=styles.js.map