import React from 'react';
import Modularity from 'modularity-front';
import { Row, CardTitle, Button, Col, Card } from 'react-materialize';

let Module = Modularity.Module;

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

	addProd (e) {
		e.preventDefault();
		
		let prod = {
			id:this.props.id,
			name:this.CardTitle.value,
			price:this.Price.value,
			quantity:1
		}
		this.product.set(prod)
	}
    
	render() {
		var CardButton = this.CardButton.value;
		return(
			
			<Row>
				<Col m={6} s={12}>
					<Card horizontal header={<CardTitle image={'/card.jpg'} />} actions={[<a />]} >
					Here is the standard card with a horizontal image.
					</Card>
				</Col>
			</Row>
			);
				    
	}
}


HorizontalCard.Inputs = {
	
	CardTitle:{
		type: Module.Types.Text,
		defaultValue:"Some test title"
	},
	CardBody: {
		type: Module.Types.Text,
		defaultValue:"I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively." 	
		
	},
	CardImage:{
		type: Module.Types.Text,
		defaultValue:"/card.jpg"
		
	},
	Price:{
		type: Module.Types.Number,
		defaultValue:12
	},
	CardButton:{
		//should be boolean if we have just add 
		type:Module.Types.Text,
		defaultValue:true
	}	
	
}

HorizontalCard.Outputs = {
	product:{
	}
}



HorizontalCard.Category = "sxoinas";
export default HorizontalCard;