import React from 'react';
import Link from 'gatsby-link';
import {
  Navbar,
  NavbarBrand,
  NavbarItem,
  NavbarBurger,
  NavbarMenu,
  NavbarStart,
  NavbarEnd,
  Container,
  NavbarLink,
  NavbarDropdown,
} from 'bloomer';

import { compose, withState, withHandlers } from 'recompose';
import RegistrationButton from '../Buttons/Registration.js';
import logo from '../Images/logo-no-text.png';

const Header = compose(
  withState('isOpen', 'setIsOpen', false),
  withHandlers({
    toggleNav: ({ setIsOpen }) => () => setIsOpen(n => !n),
  }),
)(({ isOpen, toggleNav }) => (
  <Container>
    <Navbar style={{}}>
      <NavbarBrand className="navbar-brand">
        <NavbarItem>
          <Link to="/">
            <img
              src={logo}
              alt="Logo"
              style={{
                maxHeight: '3rem',
              }}
            />
          </Link>
        </NavbarItem>
        <NavbarBurger isActive={isOpen} onClick={toggleNav} />
      </NavbarBrand>
      <NavbarMenu isActive={isOpen} onClick={toggleNav}>
        <NavbarStart>
          <NavbarItem href="/#about" isTab>
            About
          </NavbarItem>
          <NavbarItem href="/#speakers" isTab>
            Speakers
          </NavbarItem>
          <NavbarItem href="/#sponsors" isTab>
            Sponsors
          </NavbarItem>
          <NavbarItem href="/travel" isTab>
            Travel
          </NavbarItem>
          <NavbarItem href="/contact" isTab>
            Contact Us
          </NavbarItem>
          <NavbarItem hasDropdown isHoverable>
            <NavbarLink>Previous Events</NavbarLink>
            <NavbarDropdown>
              <NavbarItem href="http://2019.ecomchicago.com">
                ecomChicago 2019
              </NavbarItem>
              <NavbarItem href="http://2018.ecomchicago.com">
                ecomChicago 2018
              </NavbarItem>
              <NavbarItem href="http://2017.ecomchicago.com">
                ecomChicago 2017
              </NavbarItem>
              <NavbarItem href="http://2016.ecomchicago.com">
                ecomChicago 2016
              </NavbarItem>
            </NavbarDropdown>
          </NavbarItem>
        </NavbarStart>
        <NavbarEnd>
          <NavbarItem>
            <RegistrationButton />
          </NavbarItem>
        </NavbarEnd>
      </NavbarMenu>
    </Navbar>
  </Container>
));

export default Header;

@@ -52,16 +52,17 @@
 -link';%0A
+%0A
 import %7B
@@ -566,16 +566,22 @@
 oggleNav
+, data
  %7D) =%3E (
@@ -1296,255 +1296,8 @@
 sTab
-%3E%0A            Sponsors%0A          %3C/NavbarItem%3E%0A          %3CNavbarItem href=%22/travel%22 isTab%3E%0A            Travel%0A          %3C/NavbarItem%3E%0A          %3CNavbarItem href=%22/contact%22 isTab%3E%0A            Contact Us%0A          %3C/NavbarItem%3E%0A          %3CNavbarItem
  has
@@ -1346,22 +1346,15 @@
 ink%3E
-Previous Event
+Sponsor
 s%3C/N
@@ -1475,24 +1475,24 @@
     
+B
 ecom
-Chicago 2019
+e a Sponsor
 %0A   
@@ -1532,93 +1532,113 @@
     
-  %3CNavbarItem href=%22http://2018.ecomchicago.com%22%3E%0A                ecomChicago 2018%0A  
+%3C/NavbarDropdown%3E%0A          %3C/NavbarItem%3E%0A          %3CNavbarItem href=%22/travel%22 isTab%3E%0A            Travel%0A
     
@@ -1635,34 +1635,32 @@
 ravel%0A          
-  
 %3C/NavbarItem%3E%0A  
@@ -1649,36 +1649,32 @@
   %3C/NavbarItem%3E%0A
-    
           %3CNavba
@@ -1689,72 +1689,48 @@
 ef=%22
-http://2017.ecomchicago.com%22%3E%0A                ecomChicago 2017%0A 
+/contact%22 isTab%3E%0A            Contact Us%0A
     
@@ -1727,35 +1727,32 @@
 ct Us%0A          
-   
 %3C/NavbarItem%3E%0A  
@@ -1741,36 +1741,32 @@
   %3C/NavbarItem%3E%0A
-    
           %3CNavba
@@ -1785,52 +1785,38 @@
 http
+s
 ://
-2016.ecomchicago.com%22%3E%0A                ec
+www.facebook.com/groups/eC
 omCh
@@ -1824,13 +1824,11 @@
 cago
- 2016
+/%22%3E
 %0A   
@@ -1840,53 +1840,27 @@
     
-  %3C/NavbarItem%3E%0A            %3C/NavbarDropdown%3E
+Find us on Facebook
 %0A   

Include a link to facebook and sponsor link