"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledSubNavContainer = exports.StyledNavItem = exports.StyledNavLink = exports.StyledNavItemContainer = exports.StyledRoot = void 0;

var _index = require("../styles/index.js");

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var StyledRoot = (0, _index.styled)('nav', function (props) {
  var _props$$theme = props.$theme,
      colors = _props$$theme.colors,
      typography = _props$$theme.typography;
  return _objectSpread({}, typography.font300, {
    color: colors.foreground,
    listStyleType: 'none',
    marginTop: 0,
    marginBottom: 0,
    marginLeft: 0,
    marginRight: 0,
    paddingTop: 0,
    paddingBottom: 0,
    paddingLeft: 0,
    paddingRight: 0
  });
});
exports.StyledRoot = StyledRoot;
StyledRoot.displayName = "StyledRoot";
var StyledNavItemContainer = (0, _index.styled)('li', {});
exports.StyledNavItemContainer = StyledNavItemContainer;
StyledNavItemContainer.displayName = "StyledNavItemContainer";
var StyledNavLink = (0, _index.styled)('a', {
  color: 'inherit',
  textDecoration: 'none'
});
exports.StyledNavLink = StyledNavLink;
StyledNavLink.displayName = "StyledNavLink";
var StyledNavItem = (0, _index.styled)('div', function (props) {
  var _ref;

  var $active = props.$active,
      $selectable = props.$selectable,
      $level = props.$level,
      $theme = props.$theme,
      _props$$theme2 = props.$theme,
      colors = _props$$theme2.colors,
      sizing = _props$$theme2.sizing;
  return _ref = {
    backgroundColor: $active ? colors.primary : 'transparent',
    backgroundImage: $active ? "linear-gradient(0deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92))" : null,
    boxSizing: 'border-box'
  }, _defineProperty(_ref, $theme.direction === 'rtl' ? 'borderRightWidth' : 'borderLeftWidth', '4px'), _defineProperty(_ref, $theme.direction === 'rtl' ? 'borderRightStyle' : 'borderLeftStyle', 'solid'), _defineProperty(_ref, $theme.direction === 'rtl' ? 'borderRightColor' : 'borderLeftColor', $active ? colors.primary : 'transparent'), _defineProperty(_ref, "color", $active ? colors.primary : null), _defineProperty(_ref, "cursor", $selectable ? 'pointer' : 'default'), _defineProperty(_ref, "paddingTop", sizing.scale500), _defineProperty(_ref, "paddingBottom", sizing.scale500), _defineProperty(_ref, $theme.direction === 'rtl' ? 'paddingRight' : 'paddingLeft', "calc(".concat(sizing.scale800, " * ").concat($level, ")")), _defineProperty(_ref, $theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight', sizing.scale500), _defineProperty(_ref, ':hover', {
    color: $selectable ? colors.primary : null
  }), _defineProperty(_ref, ':focus', {
    color: $selectable ? colors.primary : null
  }), _ref;
});
exports.StyledNavItem = StyledNavItem;
StyledNavItem.displayName = "StyledNavItem";
var StyledSubNavContainer = (0, _index.styled)('ul', {
  listStyleType: 'none',
  marginTop: 0,
  marginBottom: 0,
  marginLeft: 0,
  marginRight: 0,
  paddingTop: 0,
  paddingBottom: 0,
  paddingLeft: 0,
  paddingRight: 0
});
exports.StyledSubNavContainer = StyledSubNavContainer;
StyledSubNavContainer.displayName = "StyledSubNavContainer";