"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tasks_1 = require("@angular-devkit/schematics/tasks");
const package_config_1 = require("../utils/package-config");
const AUI_VERSION = '10.5.4-nightly.2107262028';
const HAMMERJS_VERSION = '^2.0.8';
const ANGULAR_CDK_VERSION = '^11.2.13';
function default_1(options) {
    return (host, context) => {
        context.logger.debug('installPkgs');
        const ngCoreVersionTag = package_config_1.getPackageVersionFromPackageJson(host, '@angular/core');
        if (package_config_1.getPackageVersionFromPackageJson(host, '@angular/cdk') === null) {
            package_config_1.addPackageToPackageJson(host, '@angular/cdk', ANGULAR_CDK_VERSION);
        }
        package_config_1.addPackageToPackageJson(host, '@angular/forms', ngCoreVersionTag);
        package_config_1.addPackageToPackageJson(host, '@angular/animations', ngCoreVersionTag);
        package_config_1.addPackageToPackageJson(host, '@alyle/ui', `^${AUI_VERSION}`);
        if (options.gestures) {
            package_config_1.addPackageToPackageJson(host, 'hammerjs', HAMMERJS_VERSION);
        }
        const installTaskId = context.addTask(new tasks_1.NodePackageInstallTask());
        context.addTask(new tasks_1.RunSchematicTask('ng-add-setup-project', options), [installTaskId]);
    };
}
exports.default = default_1;
//# sourceMappingURL=index.js.map