"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTask = void 0;
const upath_1 = require("@ewizardjs/upath");
const I18n_1 = require("../../../modules/I18n");
function getTask(baseDir, emailsFolder, emailPath, options) {
    const ctx = {
        baseDir,
        emailsFolder,
        emailPath,
        options,
    };
    return {
        title: I18n_1.default.info(`${options.command.toUpperCase()}_TASK_TITLE`, (0, upath_1.basename)(emailPath)),
        subtasks: [
            {
                title: I18n_1.default.info('MONOREPO_SUBTASK_VALIDATE'),
                taskData: {
                    method: 'validateEmail',
                },
            },
            {
                title: I18n_1.default.info('CREATE_SUBTASK_LINK'),
                taskData: {
                    method: 'linkModules',
                },
            },
            {
                title: I18n_1.default.info('CREATE_SUBTASK_BUILD'),
                taskData: {
                    method: 'build',
                },
            },
            {
                title: I18n_1.default.info('CREATE_SUBTASK_ARCHIVE'),
                taskData: {
                    method: 'archive',
                },
                enabled: options.command === 'archive',
            },
        ],
        subtasksOptions: { concurrent: false, ctx },
    };
}
exports.getTask = getTask;
//# sourceMappingURL=getTask.js.map