"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const path_1 = tslib_1.__importDefault(require("path"));
const log_1 = tslib_1.__importDefault(require("../../utils/log"));
const copyIntegrationTheme_1 = tslib_1.__importDefault(require("./copyIntegrationTheme"));
const copyAgnosticTheme_1 = tslib_1.__importDefault(require("./copyAgnosticTheme"));
const processMagicComments_1 = tslib_1.__importDefault(require("./processMagicComments"));
async function createProject(integration, targetPath) {
    log_1.default.info(`Coppying agnostic theme to ${targetPath}`);
    await copyAgnosticTheme_1.default(integration, targetPath);
    log_1.default.info(`Coppying ${integration}-theme to ${targetPath}`);
    await copyIntegrationTheme_1.default(integration, targetPath, ['_theme', '.nuxt', 'node_modules']);
    log_1.default.info('Updating Nuxt config');
    const absoluteTargetPath = path_1.default.isAbsolute(targetPath)
        ? targetPath
        : path_1.default.join(__dirname, targetPath);
    const nuxtConfigPath = path_1.default.join(absoluteTargetPath, 'nuxt.config.js');
    await processMagicComments_1.default(nuxtConfigPath);
}
exports.default = createProject;
//# sourceMappingURL=index.js.map