"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const lib_1 = require("../../lib");
const utility_1 = require("../../lib/utility");
function default_1(_options) {
    return (tree, _context) => {
        if (!lib_1.hasAngularProject(tree, _options)) {
            return;
        }
        const { root } = lib_1.getAngularProject(tree, _options);
        if (tree.exists(root)) {
            console.info('delete', root);
            tree.delete(root);
        }
        utility_1.updateJsonFile(tree, 'angular.json', (obj) => {
            delete obj.projects[_options.project];
            return obj;
        });
        console.info('delete project', _options.project, root);
        return tree;
    };
}
exports.default = default_1;
//# sourceMappingURL=index.js.map