import React from 'react';
import {StyleSheet, View, Text , Button} from 'react-native';
import { TextInput } from 'react-native';
export default class ModuleBar {
constructor(CS){
this.CoreSystem = CS;
}
selectModule(mod, namespace) {
this.selectedModule = mod;
this.selectedModuleNamespace = namespace;
}
dragStart(ev, data) {
ev.nativeEvent.dataTransfer.setData("MyObject", JSON.stringify(data));
}
render(){
let list = this.CoreSystem.ModuleSystem.list();
let Render = Object.keys(list).map((key, index) => {
let items = Object.keys(list[key]).map((name,ind) => {
return this.selectModule(list[key][name], key)}>
this.dragStart(ev, {
namespace: key,
ctor: name
})}>{name}
});
return
{key}
{items}
;
})
return Render;
}
}