"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const schematics_1 = require("@angular-devkit/schematics");
const xplat_1 = require("@nstudio/xplat");
const xplat_utils_1 = require("@nstudio/xplat-utils");
const utils_1 = require("../../utils");
function default_1(options) {
    return schematics_1.chain([
        xplat_utils_1.prerun(options),
        xplat_1.XplatHelpers.generateLib(options, 'scss', 'xplat/nativescript', 'node', ''),
        xplat_1.XplatHelpers.cleanupLib(options, 'scss', 'xplat/nativescript', ''),
        xplat_1.XplatHelpers.generateLib(options, 'utils', 'xplat/nativescript', 'node', ''),
        xplat_1.XplatHelpers.cleanupLib(options, 'utils', 'xplat/nativescript', ''),
        options.skipDependentPlatformFiles
            ? schematics_1.noop()
            : xplat_1.XplatHelpers.addPlatformFiles(options, 'nativescript', 'scss', '_common.scss'),
        options.skipDependentPlatformFiles
            ? schematics_1.noop()
            : xplat_1.XplatHelpers.addPlatformFiles(options, 'nativescript', 'utils', 'index.ts'),
        utils_1.XplatNativeScriptHelpers.updateRootDeps(options),
        utils_1.XplatNativeScriptHelpers.updatePrettierIgnore(),
    ]);
}
exports.default = default_1;
