import React from 'react';
import styled from 'styled-components';
import { withRouter } from 'react-router-dom';
import LinkIcons from '../../../components/icons/LinkIcons';

const NavActions = () => {
  const onLogout = async () => {
    sessionStorage.clear();
  };

  return /*#__PURE__*/ React.createElement(
    'ul',
    {
      style: {
        marginTop: '1rem',
      },
    },
    /*#__PURE__*/ React.createElement(
      NavItem,
      null,
      /*#__PURE__*/ React.createElement(LinkIcons, {
        title: 'Notifications',
        svg: 'bell',
        link: '/notification/',
      })
    ),
    /*#__PURE__*/ React.createElement(
      NavItem,
      null,
      /*#__PURE__*/ React.createElement(LinkIcons, {
        title: 'Settings',
        svg: 'settings',
        link: '/settings/',
      })
    ),
    /*#__PURE__*/ React.createElement(
      NavItem,
      {
        onClick: () => onLogout(),
      },
      /*#__PURE__*/ React.createElement(LinkIcons, {
        title: 'Logout',
        svg: 'log-out',
        link: '/',
      })
    )
  );
};

export default withRouter(NavActions);
const NavItem = styled.li`
  a {
    padding-left: 2.5rem;
    padding-right: 1.5rem;
  }
`;
