"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ngAdd = ngAdd;
exports.proceedWithSchematics = proceedWithSchematics;
const schematics_1 = require("@angular-devkit/schematics");
const tasks_1 = require("@angular-devkit/schematics/tasks");
const add_dependencies_1 = require("../add-dependencies");
/**
 * Adds dependencies and runs other schematics
 * @param options
 */
function ngAdd(options) {
    return () => (0, schematics_1.chain)([
        (0, add_dependencies_1.addDependencies)(options),
        (t, ctx) => {
            const installTaskId = ctx.addTask(new tasks_1.NodePackageInstallTask());
            ctx.addTask(new tasks_1.RunSchematicTask('proceed-with-schematics', options), [installTaskId]);
            return t;
        }
    ]);
}
/** Proceed with schematics */
function proceedWithSchematics(options) {
    return (0, schematics_1.chain)([(0, schematics_1.schematic)('add-styles', options), (0, schematics_1.schematic)('add-theming', options)]);
}
//# sourceMappingURL=index.js.map