import React from 'react';
import {Button , Modal ,Row} from 'react-materialize';
import LinkManager from 'modularity-front';
import Modularity from 'modularity-front';
let Module = Modularity.Module;

class ModalModule extends Modularity.Module {
	constructor(props) {
		super(props);
    }


    render() {
      return(
        <>
          <Modal
            fixedFooter={this.ModalFooter.value}
            bottomSheet={this.BottomSheet.value}
            header={this.ModalData.value.header}
            trigger={<Button className={this.Modalbutton.value.style} waves={this.Modalbutton.value.waves}>{this.Modalbutton.value.text}</Button>}>
            <p className={this.ModalData.value.bodyStyle}>{this.ModalData.value.body}</p>
            {super.render()}
          </Modal>

        </>
      )
    }


}


ModalModule.EditPosition = 'top-right';
ModalModule.Category = "sxoinas";

ModalModule.Inputs = {
  ModalData:{
      type: Module.Types.Object,
      defaultValue:{
        header:"Modal Header",
        headerStyle:"",
        body:"Modal body data will go here",
        bodyStyle:""
      }
  },
  Modalbutton:{
      type: Module.Types.Object,
      defaultValue:{
        text:"Click me",
        style:"red",
        waves:"light"
      }
  },
  ModalFooter: {
    type: Module.Types.Boolean,
    defaultValue:false
  },
  BottomSheet:{
    type: Module.Types.Boolean,
    defaultValue: false
  },


}


ModalModule.Outputs = {

}

export default ModalModule;
