"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateTestingFiles = void 0;
const path = require("node:path");
const config_1 = require("../../config");
const utils_1 = require("../../utils");
const types_1 = require("../../types");
const generateTestingFiles = async (generateCommandState) => {
    await utils_1.TemplateGenerator.generateStaticContents(generateCommandState.command, types_1.TemplateElement.BACK_TEST, path.join('test'), '', {
        boundedContextName: generateCommandState.schema.boundedContextName,
        moduleName: generateCommandState.schema.moduleName,
        moduleNames: generateCommandState.schema.moduleNames,
        force: generateCommandState.flags.force,
        verbose: generateCommandState.flags.verbose,
        excludeFiles: generateCommandState.schema.excluded,
        lockFiles: generateCommandState.lockFiles,
        templateData: { ...generateCommandState },
    });
    const codeWriter = new utils_1.CodeWriter(path.join('src'), path.join(config_1.cliterConfig.appContainer), config_1.cliterConfig.apiContainer, generateCommandState.schema.boundedContextName.toLowerCase(), generateCommandState.schema.moduleName.toLowerCase(), generateCommandState.schema.moduleNames.toLowerCase(), generateCommandState.schema.aggregateName);
    codeWriter.generateTestingForeignReferences(generateCommandState.schema.properties);
};
exports.generateTestingFiles = generateTestingFiles;
