text: import React from 'react';
  
  import BuildControl from './BuildControl/BuildControl';
  
  import classes from './BuildControls.css';
  
  const controls = [
  	{ label: 'Salad', type: 'salad' },
  	{ label: 'Bacon', type: 'bacon' },
  	{ label: 'Cheese', type: 'cheese' },
  	{ label: 'Meat', type: 'meat' }
  ];
  
  const buildControls = (props) => (
  	<div className={classes.BuildControls}>
  		<p>
  			Current price : <strong>{props.price.toFixed(2)} $ </strong>
  		</p>
  		{controls.map((ctrl) => (
  			<BuildControl
  				added={() => props.ingredientAdded(ctrl.type)}
  				removed={() => props.ingredientRemoved(ctrl.type)}
  				key={ctrl.label}
  				label={ctrl.label}
  				disabled={props.disabled[ctrl.type]}
  			/>
  		))}
  		<button className={classes.OrderButton} 
  		onClick={props.ordered}
  		disabled={!props.purchasable}> { props.isAuth ?  'ORDER NOW' : 'SIGNUP TO CONTINUE!'}
  		
  		</button>
  	</div>
  );
  
  export default buildControls;
  