/**
 * 
 * @file Preview sidebar nav component
 * @author Box
 */
import * as React from 'react';
import { injectIntl, FormattedMessage } from 'react-intl';
import IconMagicWand from '../../icons/general/IconMagicWand';
import IconMetadataThick from '../../icons/general/IconMetadataThick';
import IconDocInfo from '../../icons/general/IconDocInfo';
import IconChatRound from '../../icons/general/IconChatRound';
import messages from '../common/messages';
import { SIDEBAR_NAV_TARGETS } from '../common/interactionTargets';
import SidebarNavButton from './SidebarNavButton';
import SidebarToggle from './SidebarToggle';
import AdditionalTabs from './additional-tabs';
import SidebarNavTablist from './SidebarNavTablist';
import { SIDEBAR_VIEW_SKILLS, SIDEBAR_VIEW_ACTIVITY, SIDEBAR_VIEW_DETAILS, SIDEBAR_VIEW_METADATA } from '../../constants';
import './SidebarNav.scss';

var SidebarNav = function SidebarNav(_ref) {
  var additionalTabs = _ref.additionalTabs,
      elementId = _ref.elementId,
      fileId = _ref.fileId,
      hasActivity = _ref.hasActivity,
      hasAdditionalTabs = _ref.hasAdditionalTabs,
      hasDetails = _ref.hasDetails,
      hasMetadata = _ref.hasMetadata,
      hasSkills = _ref.hasSkills,
      intl = _ref.intl,
      isOpen = _ref.isOpen,
      onNavigate = _ref.onNavigate;
  return React.createElement("div", {
    className: "bcs-SidebarNav",
    "aria-label": intl.formatMessage(messages.sidebarNavLabel)
  }, React.createElement("div", {
    className: "bcs-SidebarNav-tabs"
  }, React.createElement(SidebarNavTablist, {
    elementId: elementId,
    isOpen: isOpen,
    onNavigate: onNavigate
  }, hasActivity && React.createElement(SidebarNavButton, {
    "data-resin-target": SIDEBAR_NAV_TARGETS.ACTIVITY,
    sidebarView: SIDEBAR_VIEW_ACTIVITY,
    tooltip: React.createElement(FormattedMessage, messages.sidebarActivityTitle)
  }, React.createElement(IconChatRound, null)), hasDetails && React.createElement(SidebarNavButton, {
    "data-resin-target": SIDEBAR_NAV_TARGETS.DETAILS,
    sidebarView: SIDEBAR_VIEW_DETAILS,
    tooltip: React.createElement(FormattedMessage, messages.sidebarDetailsTitle)
  }, React.createElement(IconDocInfo, null)), hasSkills && React.createElement(SidebarNavButton, {
    "data-resin-target": SIDEBAR_NAV_TARGETS.SKILLS,
    sidebarView: SIDEBAR_VIEW_SKILLS,
    tooltip: React.createElement(FormattedMessage, messages.sidebarSkillsTitle)
  }, React.createElement(IconMagicWand, null)), hasMetadata && React.createElement(SidebarNavButton, {
    "data-resin-target": SIDEBAR_NAV_TARGETS.METADATA,
    sidebarView: SIDEBAR_VIEW_METADATA,
    tooltip: React.createElement(FormattedMessage, messages.sidebarMetadataTitle)
  }, React.createElement(IconMetadataThick, null))), hasAdditionalTabs && React.createElement("div", {
    className: "bcs-SidebarNav-overflow"
  }, React.createElement(AdditionalTabs, {
    key: fileId,
    tabs: additionalTabs
  }))), React.createElement("div", {
    className: "bcs-SidebarNav-footer"
  }, React.createElement(SidebarToggle, {
    isOpen: isOpen
  })));
};

export default injectIntl(SidebarNav);
//# sourceMappingURL=SidebarNav.js.map