import React from 'react';
import { Parallax} from 'react-materialize';
import LinkManager from 'modularity-front';
import Modularity from 'modularity-front';
let Module = Modularity.Module;

class ParallaxModule extends Modularity.Module {
	constructor(props) {
		super(props);
		this.state = {
        }
}
    render() {


      // const parallax = (this.ParallaxData.value || []).map((item) => {
      //   return(
      //     <div className="row">
      //       <Parallax imageSrc={item.image} />
      //        <div className="">
      //         <h2>{item.header}</h2>
      //         <p className="">{item.body}</p>
      //        </div>
      //     </div>
      //   )
      // })
      
      const parallax = (
          <div className="row">
            <Parallax imageSrc={this.Image.value} >
            </Parallax>
            {super.render()}
          </div>
        );
      return (parallax);
    }


}


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

ParallaxModule.Inputs = {
  ParallaxData:{
      type: Module.Types.Array,
      defaultValue:[
      {
        header:"Header of Parallax",
        body:"Parallax is an effect where the background content or image in this case, is moved at a different speed than the foregr",
        image:"parallax1.jpg"
      },
      {
        header:"",
        body:"",
        image:"parallax2.jpg"
      }
  ],
      arrType:Module.Types.Object
  },
  Image: {
    type: Module.Types.Text,
    defaultValue: "parallax1.jpg"
  }
}


ParallaxModule.Outputs = {

}

export default ParallaxModule;
