"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const commonData_1=require("../../../types/commonData"),common_1=require("../../../config/common"),compile_1=__importDefault(require("../compile"));class BlockCompile extends compile_1.default{getPackVersion(){return"darwin"===process.platform||(0,common_1.featureGating)("lark.gadget.compile.ide.win.switch")?"new":"default"}start(){const{type:e,sourcePath:o,distPath:t,appInfo:c}=this.options,i={type:"compile",data:{packVersion:this.getPackVersion(),type:commonData_1.AppTypeEnum.Block,watch:"watch"===e||"live"===e,projectDir:o,outputDir:t,context:{isIDE:!0,forceMinify:!1,packageType:c.packageType||"PKG",sourceMapType:"INLINE",needComponentList:!1,compileType:"splits",engine:c.blockEngineType||"base",blockIds:[c.blockTypeId],lynxBundler:c.blockLynxBundler||"core"}}};return this.startProcess(i)}get events(){return{live:{compile:"block_preview_compile",first:"block_preview_first_compile",watch:"block_preview_watch_compile"},force:{compile:"block_force_compile",first:"block_force_first_compile",watch:"block_force_watch_compile"},debug:{compile:"block_remote_debug",first:"block_remote_debug_first_compile",watch:"block_remote_debug_watch_compile"},watch:{compile:"block_debug_compile",first:"block_debug_first_compile",watch:"block_debug_watch_compile"}}[this.compileType]}}exports.default=BlockCompile;