"use strict";Object.defineProperty(exports,"__esModule",{value:true});/*** @license* Copyright Google Inc. All Rights Reserved.** Use of this source code is governed by an MIT-style license that can be* found in the LICENSE file at https://angular.io/license*/constcore_1=require("@angular-devkit/core");constschematics_1=require("@angular-devkit/schematics");constlint_fix_1=require("../utility/lint-fix");constparse_name_1=require("../utility/parse-name");constworkspace_1=require("../utility/workspace");functiondefault_1(options){returnasync(host)=>{if(options.path===undefined){options.path=awaitworkspace_1.createDefaultPath(host,options.project);}options.type=!!options.type?`.${options.type}`:'';constparsedPath=parse_name_1.parseName(options.path,options.name);options.name=parsedPath.name;options.path=parsedPath.path;consttemplateSource=schematics_1.apply(schematics_1.url('./files'),[options.skipTests?schematics_1.filter(path=>!path.endsWith('.spec.ts.template')):schematics_1.noop(),schematics_1.applyTemplates({...core_1.strings,...options,}),schematics_1.move(parsedPath.path),]);returnschematics_1.chain([schematics_1.mergeWith(templateSource),options.lintFix?lint_fix_1.applyLintFix(options.path):schematics_1.noop(),]);};}exports.default=default_1;