"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const lowcode_code_generator_1 = require("@alilc/lowcode-code-generator");
const pluginFactory = () => {
    const plugin = (pre) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
        const next = Object.assign({}, pre);
        next.chunks.push({
            type: lowcode_code_generator_1.ChunkType.STRING,
            fileType: lowcode_code_generator_1.FileType.JS,
            name: lowcode_code_generator_1.COMMON_CHUNK_NAME.ExternalDepsImport,
            content: `
      import '../assets/main.css'

      import ElementPlus from 'element-plus'
      import 'element-plus/dist/index.css'
      import { createApp } from 'vue'
      import App from './App.vue'
      import router from './router'
      `,
            linkAfter: [],
        });
        next.chunks.push({
            type: lowcode_code_generator_1.ChunkType.STRING,
            fileType: lowcode_code_generator_1.FileType.JS,
            name: lowcode_code_generator_1.COMMON_CHUNK_NAME.FileMainContent,
            content: `
      const app = createApp(App)

      app.use(ElementPlus)
      
      app.use(router)
      
      app.mount('#app')
      `,
            linkAfter: [
                lowcode_code_generator_1.COMMON_CHUNK_NAME.ExternalDepsImport,
                lowcode_code_generator_1.COMMON_CHUNK_NAME.InternalDepsImport,
                lowcode_code_generator_1.COMMON_CHUNK_NAME.ImportAliasDefine,
                lowcode_code_generator_1.COMMON_CHUNK_NAME.FileVarDefine,
                lowcode_code_generator_1.COMMON_CHUNK_NAME.FileUtilDefine,
            ],
        });
        return next;
    });
    return plugin;
};
exports.default = pluginFactory;
//# sourceMappingURL=entry.js.map