function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(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; }

/*
Copyright (c) Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import { styled, withStyle } from '../styles';
import { getMediaQueryPageMargins, getMinimumPageMargins } from '../helpers/responsive-helpers';
import { StyledListItem } from '../menu';
import { KIND } from './constants';
var StyledButton = styled('button', function (_ref) {
  var $theme = _ref.$theme,
      $isFocusVisible = _ref.$isFocusVisible;
  return {
    boxSizing: 'border-box',
    display: 'flex',
    flexDirection: 'row',
    flexWrap: 'nowrap',
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: 'transparent',
    color: $theme.colors.contentPrimary,
    borderLeftWidth: 0,
    borderTopWidth: 0,
    borderRightWidth: 0,
    borderBottomWidth: 0,
    paddingTop: '0',
    paddingBottom: '0',
    paddingLeft: '0',
    paddingRight: '0',
    marginLeft: 0,
    marginTop: 0,
    marginRight: 0,
    marginBottom: 0,
    outline: $isFocusVisible ? "3px solid ".concat($theme.colors.borderAccent) : 'none',
    outlineOffset: '-3px',
    WebkitAppearance: 'none',
    cursor: 'pointer'
  };
});
StyledButton.displayName = "StyledButton";
StyledButton.displayName = 'StyledButton';
export var StyledRoot = styled('div', function (props) {
  var $theme = props.$theme;
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $theme.typography.font300), getMinimumPageMargins($theme.grid.margins)), getMediaQueryPageMargins($theme)), {}, {
    boxSizing: 'border-box',
    backgroundColor: $theme.colors.backgroundPrimary,
    borderBottomWidth: '1px',
    borderBottomStyle: 'solid',
    borderBottomColor: "".concat($theme.colors.borderOpaque)
  });
});
StyledRoot.displayName = "StyledRoot";
StyledRoot.displayName = 'StyledRoot';
export var StyledSubnavContainer = styled('div', {});
StyledSubnavContainer.displayName = "StyledSubnavContainer";
StyledSubnavContainer.displayName = 'StyledSubnavContainer';
export var StyledSpacing = styled('div', function (props) {
  var $theme = props.$theme;
  return _defineProperty({
    boxSizing: 'border-box',
    height: '100%',
    display: 'flex',
    alignItems: 'center',
    paddingTop: $theme.sizing.scale400,
    paddingBottom: $theme.sizing.scale400
  }, $theme.mediaQuery.medium, {
    paddingTop: $theme.sizing.scale700,
    paddingBottom: $theme.sizing.scale700
  });
});
StyledSpacing.displayName = "StyledSpacing";
StyledSpacing.displayName = 'StyledSpacing';
export var StyledAppName = styled('div', function (_ref3) {
  var $theme = _ref3.$theme;
  return _objectSpread(_objectSpread({}, $theme.typography.font550), {}, _defineProperty({
    color: $theme.colors.contentPrimary,
    textDecoration: 'none'
  }, $theme.mediaQuery.medium, _objectSpread({}, $theme.typography.font650)));
});
StyledAppName.displayName = "StyledAppName";
StyledAppName.displayName = 'StyledAppName';
export var StyledSideMenuButton = withStyle(StyledButton, function (_ref4) {
  var $theme = _ref4.$theme;
  return _objectSpread(_objectSpread({}, $theme.direction === 'rtl' ? {
    marginLeft: $theme.sizing.scale600
  } : {
    marginRight: $theme.sizing.scale600
  }), {}, {
    paddingTop: $theme.sizing.scale100,
    paddingBottom: $theme.sizing.scale100,
    paddingLeft: $theme.sizing.scale100,
    paddingRight: $theme.sizing.scale100
  });
});
StyledSideMenuButton.displayName = "StyledSideMenuButton";
StyledSideMenuButton.displayName = 'StyledSideMenuButton';
export var StyledPrimaryMenuContainer = styled('div', function (_ref5) {
  var $theme = _ref5.$theme;
  return {
    boxSizing: 'border-box',
    height: '100%',
    display: 'flex',
    flexDirection: 'row',
    flexGrow: 1,
    flexWrap: 'nowrap',
    justifyContent: 'flex-end',
    alignItems: 'stretch',
    paddingInlineEnd: $theme.sizing.scale1000
  };
});
StyledPrimaryMenuContainer.displayName = "StyledPrimaryMenuContainer";
StyledPrimaryMenuContainer.displayName = 'StyledPrimaryMenuContainer';
export var StyledMainMenuItem = styled('div', function (props) {
  var $active = props.$active,
      $isFocusVisible = props.$isFocusVisible,
      $kind = props.$kind,
      _props$$theme = props.$theme,
      colors = _props$$theme.colors,
      sizing = _props$$theme.sizing,
      direction = _props$$theme.direction;
  return {
    boxSizing: 'border-box',
    display: 'flex',
    alignItems: 'center',
    color: $active ? colors.contentPrimary : colors.contentTertiary,
    marginLeft: sizing.scale700,
    marginRight: sizing.scale700,
    paddingTop: $kind === KIND.secondary ? sizing.scale750 : '0',
    paddingBottom: $kind === KIND.secondary ? sizing.scale750 : '0',
    outline: $isFocusVisible ? "3px solid ".concat(colors.borderAccent) : 'none',
    outlineOffset: '-3px',
    borderBottomWidth: '2px',
    borderBottomStyle: 'solid',
    borderBottomColor: $active && !$isFocusVisible ? colors.borderSelected : 'transparent',
    cursor: $active ? 'default' : 'pointer',
    whiteSpace: $kind === KIND.secondary ? 'nowrap' : 'initial',
    ':first-child': _objectSpread({}, direction === 'rtl' ? {
      marginRight: '0'
    } : {
      marginLeft: '0'
    }),
    ':last-child': _objectSpread({}, direction === 'rtl' ? {
      marginLeft: '0'
    } : {
      marginRight: '0'
    }),
    ':hover': {
      color: colors.contentPrimary
    }
  };
});
StyledMainMenuItem.displayName = "StyledMainMenuItem";
StyledMainMenuItem.displayName = 'StyledMainMenuItem';
export var StyledSecondaryMenuContainer = styled('div', function (_ref6) {
  var $theme = _ref6.$theme;
  return {
    boxSizing: 'border-box',
    height: '100%',
    display: 'flex',
    flexDirection: 'row',
    flexWrap: 'nowrap',
    justifyContent: 'flex-start',
    margin: 'auto',
    maxWidth: "".concat($theme.grid.maxWidth, "px"),
    alignItems: 'stretch',
    overflow: 'auto'
  };
});
StyledSecondaryMenuContainer.displayName = "StyledSecondaryMenuContainer";
StyledSecondaryMenuContainer.displayName = 'StyledSecondaryMenuContainer';
export var StyledUserMenuButton = StyledButton;
StyledUserMenuButton.displayName = 'StyledUserMenuButton';
export var StyledUserMenuProfileListItem = withStyle(StyledListItem, function (_ref7) {
  var $theme = _ref7.$theme;
  return _objectSpread({
    paddingTop: '0',
    paddingBottom: '0'
  }, $theme.direction === 'rtl' ? {
    paddingLeft: '0'
  } : {
    paddingRight: '0'
  });
});
StyledUserMenuProfileListItem.displayName = "StyledUserMenuProfileListItem";
StyledUserMenuProfileListItem.displayName = 'StyledUserMenuProfileListItem';
export var StyledUserProfileTileContainer = styled('div', function (_ref8) {
  var $theme = _ref8.$theme;
  return {
    boxSizing: 'border-box',
    height: '100%',
    display: 'flex',
    flexDirection: 'row',
    flexWrap: 'nowrap',
    justifyContent: 'flex-start',
    paddingTop: $theme.sizing.scale650,
    paddingBottom: $theme.sizing.scale650
  };
});
StyledUserProfileTileContainer.displayName = "StyledUserProfileTileContainer";
StyledUserProfileTileContainer.displayName = 'StyledUserProfileTileContainer';
export var StyledUserProfilePictureContainer = styled('div', function (_ref9) {
  var $theme = _ref9.$theme;
  return _objectSpread({}, $theme.direction === 'rtl' ? {
    marginLeft: $theme.sizing.scale600
  } : {
    marginRight: $theme.sizing.scale600
  });
});
StyledUserProfilePictureContainer.displayName = "StyledUserProfilePictureContainer";
StyledUserProfilePictureContainer.displayName = 'StyledUserProfilePictureContainer'; // eslint-disable-next-line @typescript-eslint/no-unused-vars

export var StyledUserProfileInfoContainer = styled('div', function (_ref10) {
  var $theme = _ref10.$theme;
  return {
    boxSizing: 'border-box',
    alignSelf: 'center'
  };
});
StyledUserProfileInfoContainer.displayName = "StyledUserProfileInfoContainer";
StyledUserProfileInfoContainer.displayName = 'StyledUserProfileInfoContainer'; // eslint-disable-next-line @typescript-eslint/no-unused-vars

export var StyledDesktopMenuContainer = styled('div', function (_ref11) {
  var $theme = _ref11.$theme;
  return {};
});
StyledDesktopMenuContainer.displayName = "StyledDesktopMenuContainer";
StyledDesktopMenuContainer.displayName = 'StyledDesktopMenuContainer';
export var StyledDesktopMenu = styled('div', function (_ref12) {
  var $theme = _ref12.$theme;
  return {
    alignItems: 'center',
    display: 'flex',
    justifyContent: 'space-between',
    margin: 'auto',
    maxWidth: "".concat($theme.grid.maxWidth, "px"),
    paddingBlockStart: '18px',
    paddingBlockEnd: '18px'
  };
});
StyledDesktopMenu.displayName = "StyledDesktopMenu";
StyledDesktopMenu.displayName = 'StyledDesktopMenu';