import Component from '../components/component.react';
import React from 'react-native';
import {logout} from '../auth/actions';
import {
  ScrollView,
  Text
} from 'react-native';

import styles from './menu.style';

class Menu extends Component {

  onItemSelected(item) {
    this.props.menuActions.close();
    this.props.onItemSelected(item);
  }

  logoutUser() {
    this.props.menuActions.close();
    logout();
  }

  render() {
    return (
      <ScrollView style={styles.menu}>
        <Text onPress={_ => this.onItemSelected('champagnes')} style={styles.item}>CHAMPAGNE</Text>
        <Text onPress={_ => this.onItemSelected('orders')} style={styles.item}>ORDERS</Text>
        <Text onPress={_ => this.logoutUser()} style={styles.item}>LOGOUT</Text>
      </ScrollView>
    );
  }

}

Menu.propTypes = {
  menuActions: React.PropTypes.object,
  onItemSelected: React.PropTypes.func.isRequired
};

export default Menu;

@@ -82,16 +82,51 @@
 ative';%0A
+import %7Bmsg%7D from '../intl/store';%0A
 import %7B
@@ -186,16 +186,24 @@
 ,%0A  Text
+,%0A  View
 %0A%7D from 
@@ -471,24 +471,62 @@
  render() %7B%0A
+    const %7BisLoggedIn%7D = this.props;%0A%0A
     return (
@@ -618,152 +618,512 @@
 ed('
-champagnes')%7D style=%7Bstyles.item%7D%3ECHAMPAGNE%3C/Text%3E%0A        %3CText onPress=%7B_ =%3E this.onItemSelected('orders')%7D style=%7Bstyles.item%7D%3EORDERS
+home')%7D style=%7Bstyles.item%7D%3E%0A          %7Bmsg('menu.home')%7D%0A        %3C/Text%3E%0A        %3CText onPress=%7B_ =%3E this.onItemSelected('todos')%7D style=%7Bstyles.item%7D%3E%0A          %7Bmsg('menu.todos')%7D%0A        %3C/Text%3E%0A        %3CText onPress=%7B_ =%3E this.onItemSelected('examples')%7D style=%7Bstyles.item%7D%3E%0A          %7Bmsg('menu.examples')%7D%0A        %3C/Text%3E%0A%0A        %7BisLoggedIn && (%0A          %3CView%3E%0A            %3CText onPress=%7B_ =%3E this.onItemSelected('me')%7D style=%7Bstyles.item%7D%3E%0A              %7Bmsg('menu.me')%7D%0A            
 %3C/Text%3E%0A
     
@@ -1110,32 +1110,36 @@
         %3C/Text%3E%0A
+    
         %3CText on
@@ -1193,21 +1193,262 @@
 em%7D%3E
-LOGOUT%3C/Text%3E
+%0A              %7Bmsg('menu.logout')%7D%0A            %3C/Text%3E%0A          %3C/View%3E%0A        )%7D%0A%0A        %7B!isLoggedIn && (%0A          %3CText onPress=%7B_ =%3E this.onItemSelected('login')%7D style=%7Bstyles.item%7D%3E%0A            %7Bmsg('menu.login')%7D%0A          %3C/Text%3E%0A        )%7D%0A
 %0A   
@@ -1498,16 +1498,65 @@
 pes = %7B%0A
+  isLoggedIn: React.PropTypes.object.isRequired,%0A
   menuAc

Add in more menu goodies