import React from'react';import Module from'../Module';import Extendable from'../base/ExtendableContainer';import{InputMarker}from'../ModuleUtilities';import{FontAwesomeIcon}from'@fortawesome/react-fontawesome';import'./ModuleServiceInfo.css';class ModuleServiceInfo extends Module{constructor(a){super(a),this.state={modid:'',route:''}}loadModule(a){let b=prompt('Module ID: ');b&&(a.id=b,this.ModuleSystem.loadModule(a),this.CoreSystem.refresh(!0))}removeModule(a){this.ModuleSystem.remove(a),this.CoreSystem.refresh(),this.forceUpdate()}render(){let a=this.ModuleSystem.getModules();// console.log(modules); return React.createElement('div',{className:'ModuleServiceInfo'},React.createElement('div',{className:'row'},this.__renderID()),React.createElement('div',{className:'row'},React.createElement('div',{className:'col s3'},'Modules'),React.createElement('div',{className:'col'},a.length,React.createElement(InputMarker,{onDrop:a=>this.loadModule(a)}))),React.createElement('div',{className:'row ModuleList white z-depth-1'},a.map(a=>React.createElement('div',{className:'col s6 text-left',style:{overflow:'hidden'},key:a.id},React.createElement('div',{style:{display:'inline-block'}},React.createElement(FontAwesomeIcon,{icon:'eraser',onClick:()=>this.removeModule(a.id)})),React.createElement('div',{style:{display:'inline-block',width:48}},a.id)))),super.render())}}ModuleServiceInfo.Category='Services';export default ModuleServiceInfo;