import { Entity } from '../../core/Entity' ; import { Editor } from './Editor' ; import { BeaconEditor } from './BeaconEditor' ; import { InserterEditor } from './InserterEditor' ; import { MachineEditor } from './MachineEditor' ; import { MiningEditor } from './MiningEditor' ; import { SplitterEditor } from './SplitterEditor' ; import { ChestEditor } from './ChestEditor' ; import { TempEditor } from './TempEditor' ; description param entityNumber export function createEditor ( entity ) { let editor ; switch ( entity . name ) { case 'assembling_machine_1' : case 'assembling_machine_2' : case 'assembling_machine_3' : { editor = new MachineEditor ( entity ) ; break ; } case 'beacon' : { editor = new BeaconEditor ( entity ) ; break ; } case 'filter_inserter' : case 'stack_filter_inserter' : { editor = new InserterEditor ( entity ) ; break ; } case 'electric_mining_drill' : { editor = new MiningEditor ( entity ) ; break ; } case 'splitter' : case 'fast_splitter' : case 'express_splitter' : { editor = new SplitterEditor ( entity ) ; break ; } case 'logistic_chest_buffer' : case 'logistic_chest_requester' : case 'logistic_chest_storage' : { editor = new ChestEditor ( entity ) ; break ; } case 'lab' : case 'electric_furnace' : case 'pumpjack' : case 'oil_refinery' : case 'chemical_plant' : case 'centrifuge' : case 'rocket_silo' : editor = new TempEditor ( entity ) ; break ; default : { return undefined ; } } return editor ; }