"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generatePwshModule = void 0;
const plugin_create_inline_properties_1 = require("../plugins/plugin-create-inline-properties");
const plugin_tweak_model_1 = require("../plugins/plugin-tweak-model");
const plugin_tweak_model_azure_v2_1 = require("../plugins/plugin-tweak-model-azure-v2");
const create_commands_v2_1 = require("../plugins/create-commands-v2");
const cs_namer_v2_1 = require("../plugins/cs-namer-v2");
const ps_namer_v2_1 = require("../plugins/ps-namer-v2");
const llcsharp_v2_1 = require("../plugins/llcsharp-v2");
const powershell_v2_1 = require("../plugins/powershell-v2");
const modifiers_v2_1 = require("../plugins/modifiers-v2");
const plugin_tweak_m4_model_1 = require("../plugins/plugin-tweak-m4-model");
const model_state_1 = require("./model-state");
const tsp_host_1 = require("./tsp-host");
async function generatePwshModule(pwshModel, emitterOptions) {
    const tspService = new tsp_host_1.TspHostImpl(emitterOptions);
    const state = await new model_state_1.ModelState(tspService);
    state.model = pwshModel;
    await (0, plugin_tweak_m4_model_1.tweakModelForTsp)(state);
    await (0, plugin_tweak_model_1.tweakModelV2)(state);
    await (0, plugin_tweak_model_azure_v2_1.tweakModel)(state);
    await (await new create_commands_v2_1.Inferrer(state).init()).createCommands();
    await (0, plugin_create_inline_properties_1.createVirtuals)(state);
    await (0, cs_namer_v2_1.nameStuffRight)(state);
    await (0, ps_namer_v2_1.tweakModel)(state);
    await (0, modifiers_v2_1.tweakModelForTsp)(state);
    await (0, llcsharp_v2_1.llcsharpV2)(tspService, state);
    await (0, powershell_v2_1.powershellV2)(tspService, state);
    return;
}
exports.generatePwshModule = generatePwshModule;
//# sourceMappingURL=tsp-generator.js.map