"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledUserProfileTileContainer = exports.StyledUserProfilePictureContainer = exports.StyledUserProfileInfoContainer = exports.StyledUserMenuProfileListItem = exports.StyledUserMenuButton = exports.StyledSubnavContainer = exports.StyledSpacing = exports.StyledSideMenuButton = exports.StyledSecondaryMenuContainer = exports.StyledRoot = exports.StyledPrimaryMenuContainer = exports.StyledMainMenuItem = exports.StyledDesktopMenuContainer = exports.StyledDesktopMenu = exports.StyledAppName = void 0;

var _styles = require("../styles");

var _responsiveHelpers = require("../helpers/responsive-helpers");

var _menu = require("../menu");

var _constants = require("./constants");

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; }

var StyledButton = (0, _styles.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';
var StyledRoot = (0, _styles.styled)('div', function (props) {
  var $theme = props.$theme;
  return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $theme.typography.font300), (0, _responsiveHelpers.getMinimumPageMargins)($theme.grid.margins)), (0, _responsiveHelpers.getMediaQueryPageMargins)($theme)), {}, {
    boxSizing: 'border-box',
    backgroundColor: $theme.colors.backgroundPrimary,
    borderBottomWidth: '1px',
    borderBottomStyle: 'solid',
    borderBottomColor: "".concat($theme.colors.borderOpaque)
  });
});
exports.StyledRoot = StyledRoot;
StyledRoot.displayName = "StyledRoot";
StyledRoot.displayName = 'StyledRoot';
var StyledSubnavContainer = (0, _styles.styled)('div', {});
exports.StyledSubnavContainer = StyledSubnavContainer;
StyledSubnavContainer.displayName = "StyledSubnavContainer";
StyledSubnavContainer.displayName = 'StyledSubnavContainer';
var StyledSpacing = (0, _styles.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
  });
});
exports.StyledSpacing = StyledSpacing;
StyledSpacing.displayName = "StyledSpacing";
StyledSpacing.displayName = 'StyledSpacing';
var StyledAppName = (0, _styles.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)));
});
exports.StyledAppName = StyledAppName;
StyledAppName.displayName = "StyledAppName";
StyledAppName.displayName = 'StyledAppName';
var StyledSideMenuButton = (0, _styles.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
  });
});
exports.StyledSideMenuButton = StyledSideMenuButton;
StyledSideMenuButton.displayName = "StyledSideMenuButton";
StyledSideMenuButton.displayName = 'StyledSideMenuButton';
var StyledPrimaryMenuContainer = (0, _styles.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
  };
});
exports.StyledPrimaryMenuContainer = StyledPrimaryMenuContainer;
StyledPrimaryMenuContainer.displayName = "StyledPrimaryMenuContainer";
StyledPrimaryMenuContainer.displayName = 'StyledPrimaryMenuContainer';
var StyledMainMenuItem = (0, _styles.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 === _constants.KIND.secondary ? sizing.scale750 : '0',
    paddingBottom: $kind === _constants.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 === _constants.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
    }
  };
});
exports.StyledMainMenuItem = StyledMainMenuItem;
StyledMainMenuItem.displayName = "StyledMainMenuItem";
StyledMainMenuItem.displayName = 'StyledMainMenuItem';
var StyledSecondaryMenuContainer = (0, _styles.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'
  };
});
exports.StyledSecondaryMenuContainer = StyledSecondaryMenuContainer;
StyledSecondaryMenuContainer.displayName = "StyledSecondaryMenuContainer";
StyledSecondaryMenuContainer.displayName = 'StyledSecondaryMenuContainer';
var StyledUserMenuButton = StyledButton;
exports.StyledUserMenuButton = StyledUserMenuButton;
StyledUserMenuButton.displayName = 'StyledUserMenuButton';
var StyledUserMenuProfileListItem = (0, _styles.withStyle)(_menu.StyledListItem, function (_ref7) {
  var $theme = _ref7.$theme;
  return _objectSpread({
    paddingTop: '0',
    paddingBottom: '0'
  }, $theme.direction === 'rtl' ? {
    paddingLeft: '0'
  } : {
    paddingRight: '0'
  });
});
exports.StyledUserMenuProfileListItem = StyledUserMenuProfileListItem;
StyledUserMenuProfileListItem.displayName = "StyledUserMenuProfileListItem";
StyledUserMenuProfileListItem.displayName = 'StyledUserMenuProfileListItem';
var StyledUserProfileTileContainer = (0, _styles.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
  };
});
exports.StyledUserProfileTileContainer = StyledUserProfileTileContainer;
StyledUserProfileTileContainer.displayName = "StyledUserProfileTileContainer";
StyledUserProfileTileContainer.displayName = 'StyledUserProfileTileContainer';
var StyledUserProfilePictureContainer = (0, _styles.styled)('div', function (_ref9) {
  var $theme = _ref9.$theme;
  return _objectSpread({}, $theme.direction === 'rtl' ? {
    marginLeft: $theme.sizing.scale600
  } : {
    marginRight: $theme.sizing.scale600
  });
});
exports.StyledUserProfilePictureContainer = StyledUserProfilePictureContainer;
StyledUserProfilePictureContainer.displayName = "StyledUserProfilePictureContainer";
StyledUserProfilePictureContainer.displayName = 'StyledUserProfilePictureContainer'; // eslint-disable-next-line @typescript-eslint/no-unused-vars

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

var StyledDesktopMenuContainer = (0, _styles.styled)('div', function (_ref11) {
  var $theme = _ref11.$theme;
  return {};
});
exports.StyledDesktopMenuContainer = StyledDesktopMenuContainer;
StyledDesktopMenuContainer.displayName = "StyledDesktopMenuContainer";
StyledDesktopMenuContainer.displayName = 'StyledDesktopMenuContainer';
var StyledDesktopMenu = (0, _styles.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'
  };
});
exports.StyledDesktopMenu = StyledDesktopMenu;
StyledDesktopMenu.displayName = "StyledDesktopMenu";
StyledDesktopMenu.displayName = 'StyledDesktopMenu';