/*

!----------------------------------------------------------------------------!
!                                                                            !
! Yexpert : (your) Système Expert sous Mumps GT.M et GNU/Linux               !
! Copyright (C) 2001-2015 by Hamid LOUAKED (HL).                             !
!                                                                            !
!----------------------------------------------------------------------------!

*/

"use strict"

var React = require('react');
var ReactBootstrap = require('react-bootstrap');
var {
  Nav,
  Navbar,
  NavItem
} = ReactBootstrap;

var Banner = React.createClass({

  render: function() {
    //console.log('render Banner');
    //this.props.controller.updateComponentPath(this);

    return (
      <div>
        <Navbar inverse >
          <Navbar.Brand>
            {this.props.title}
          </Navbar.Brand>
          <Nav 
            onSelect = {this.props.controller.navOptionSelected}
          >
            <NavItem
              eventKey = "menustore"
            >
              Menu général
            </NavItem>
            <NavItem
              eventKey = "terminal"
            >
              Terminal
            </NavItem>
            <NavItem
              eventKey = "overview"
            >
              Vue d'ensemble
            </NavItem>
            <NavItem
              eventKey = "docstore"
            >
              Globals
            </NavItem>
            <NavItem
              eventKey = "sessions"
            >
              Sessions
            </NavItem>
            <NavItem
              eventKey = "console"
            >
              Console
            </NavItem>
          </Nav>
          <Nav
            pullRight
            onSelect = {this.props.controller.navOptionSelected}
          >
            <NavItem
              eventKey = "logout"
            >
              Se déconnecter
            </NavItem>
          </Nav>
        </Navbar>
      </div>
    );
  }
});

module.exports = Banner;


