import {FormGroup,ControlLabel,FormControl,Button} from 'react-bootstrap';
{{#eachfunctions}}
class {{capitalizename}}_{{@index}}_Form extends React.Component {
constructor(props){
super(props);
this.state = {
{{#ifinputs.length}}
input: {
{{#eachinputs}}
{{name}}: ''{{#unless@last}},{{/unless}}
{{/each}}
},
{{/if}}
{{#ifviewstateMutability}}
output: null,
{{/ifview}}
message: ''
};
}
handleChange(e, name){
this.state[name] = e.target.value;
this.setState(this.state);
}
async handleClick(e){
e.preventDefault();
{{#ifviewstateMutability}}
this.setState({output:null});
let result = await {{../contractName}}.methods{{methodname../functionsnameinputs}}({{#eachinputs}}this.state.{{name}}{{#unless@last}}, {{/unless}}{{/each}}).call();